Skip to content

Commit

Permalink
Merge pull request #3 from arduino-libraries/revamp
Browse files Browse the repository at this point in the history
Revamp API
  • Loading branch information
sebromero authored Jun 4, 2024
2 parents 107d276 + 887a061 commit 83f2f3f
Show file tree
Hide file tree
Showing 24 changed files with 1,100 additions and 923 deletions.
52 changes: 17 additions & 35 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Source: https://github.com/per1234/.github/blob/main/workflow-templates/compile-examples-private.md
name: Compile Examples

# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
Expand All @@ -22,11 +23,9 @@ on:

env:
UNIVERSAL_SKETCH_PATHS: |
- examples/Battery
- examples/Charger
- examples/DeepSleep_WakeFromPin
- examples/DeepSleep_WakeFromRTC
- examples/Powershell
- examples/Battery
- examples/Charger
- examples/Standby_WakeFromPin
SKETCHES_REPORTS_PATH: sketches-reports
SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports

Expand All @@ -43,10 +42,18 @@ jobs:

matrix:
board:
- fqbn: arduino:mbed_portenta:envie_m7
platforms: |
- name: arduino:mbed_portenta
artifact-name-suffix: arduino-mbed_portenta-envie_m7
additional-sketch-paths: |
- examples/Standby_WakeFromRTC_H7
- fqbn: arduino:renesas_portenta:portenta_c33
platforms: |
- name: arduino:renesas_portenta
artifact-name-suffix: arduino-renesas_portenta-portenta_c33
additional-sketch-paths: |
- examples/Standby_WakeFromRTC_C33
steps:
- name: Checkout repository
Expand All @@ -59,11 +66,10 @@ jobs:
fqbn: ${{ matrix.board.fqbn }}
platforms: ${{ matrix.board.platforms }}
libraries: |
# Install the library from the local path.
- source-path: ./
# - name: Arduino_PF1550
- source-url: https://github.com/cristidragomir97/Arduino_PF1550_old.git
- source-url: https://github.com/cristidragomir97/Arduino_Portenta_C33_LowPower.git
- name: Arduino_PF1550
- name: Arduino_LowPowerPortentaH7
- source-url: https://github.com/arduino-libraries/Arduino_LowPowerPortentaC33.git
sketch-paths: |
${{ env.UNIVERSAL_SKETCH_PATHS }}
${{ matrix.board.additional-sketch-paths }}
Expand All @@ -74,29 +80,5 @@ jobs:
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
path: ${{ env.SKETCHES_REPORTS_PATH }}
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}

report-size-deltas:
needs: build
# Run even if some compilations failed.
if: always() && github.event_name == 'pull_request'
runs-on: ubuntu-latest
permissions:
pull-requests: write

steps:
- name: Download sketches reports artifact
id: download-artifact
continue-on-error: true # If compilation failed for all boards then there are no artifacts
uses: actions/download-artifact@v4
with:
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
path: ${{ env.SKETCHES_REPORTS_PATH }}

- name: Comment size deltas report to PR
uses: arduino/report-size-deltas@v1
# If actions/download-artifact failed, there are no artifacts to report from.
if: steps.download-artifact.outcome == 'success'
with:
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ⚡ Arduino PowerManagement

[![Check Arduino](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/check-arduino.yml) [![Compile Examples](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/compile-examples.yml) [![Spell Check](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/spell-check.yml/badge.svg)](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/spell-check.yml) [![Sync Labels](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/sync-labels.yml/badge.svg)](https://github.com/cristidragomir97/Arduino_PowerManagement/actions/workflows/sync-labels.yml)
[![Check Arduino](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/check-arduino.yml) [![Compile Examples](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/compile-examples.yml) [![Spell Check](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/spell-check.yml) [![Sync Labels](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/sync-labels.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_PowerManagement/actions/workflows/sync-labels.yml)

The Arduino Pro Power Management Library serves as a comprehensive and sophisticated power management toolkit tailored for Arduino Pro boards, encompassing the Portenta H7, Portenta C33, and Nicla Vision.

Expand All @@ -9,7 +9,7 @@ This library streamlines the interaction with complex hardware components such a
## ✅ Supported Boards

- Arduino Portenta H7
- Arduino Nicla Vision
- Arduino Nicla Vision (Low power features not supported yet)
- Arduino Portenta C33

## Core Components of the Library
Expand Down
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,19 +221,19 @@ To simplify things, we have added a convenience function in `Board` called `slee
Here's an overview of the reduction in power usage that you can expect from this library on the Portenta C33. The screenshots below are taken from the nRF Power Profiler application using a Nordic PPK2 while running the blink sketch on the same board.

#### Without power optimisations
![](https://raw.githubusercontent.com/cristidragomir97/Arduino_Portenta_C33_LowPower/main/extras/results/normal_usage_blink.png)
![](https://raw.githubusercontent.com/arduino-libraries/Arduino_Portenta_C33_LowPower/main/extras/results/normal_usage_blink.png)

#### Sleep (ADC, RGB LED, Secure Element, Wifi and Bluetooth off)
![](https://raw.githubusercontent.com/cristidragomir97/Arduino_Portenta_C33_LowPower/main/extras/results/sleep_no_peripherals.png)
![](https://raw.githubusercontent.com/arduino-libraries/Arduino_Portenta_C33_LowPower/main/extras/results/sleep_no_peripherals.png)

#### Deep Sleep (ADC, RGB LED, Secure Element, Wifi and Bluetooth off)
![](https://raw.githubusercontent.com/cristidragomir97/Arduino_Portenta_C33_LowPower/main/extras/results/deep_sleep_no_peripherals.png)
![](https://raw.githubusercontent.com/arduino-libraries/Arduino_Portenta_C33_LowPower/main/extras/results/deep_sleep_no_peripherals.png)

#### Sleep (ADC, RGB LED, Secure Element, Wifi and Bluetooth on)
![](https://raw.githubusercontent.com/cristidragomir97/Arduino_Portenta_C33_LowPower/main/extras/results/sleep_peripherals_on.png)
![](https://raw.githubusercontent.com/arduino-libraries/Arduino_Portenta_C33_LowPower/main/extras/results/sleep_peripherals_on.png)

#### Deep Sleep (ADC, RGB LED, Secure Element, Wifi and Bluetooth on)
![](https://raw.githubusercontent.com/cristidragomir97/Arduino_Portenta_C33_LowPower/main/extras/results/deep_sleep_peripherals_on.png)
![](https://raw.githubusercontent.com/arduino-libraries/Arduino_Portenta_C33_LowPower/main/extras/results/deep_sleep_peripherals_on.png)



Expand Down
Loading

0 comments on commit 83f2f3f

Please sign in to comment.