|
1 | 1 | /*
|
2 | 2 | Standby Wake From Pin Demo
|
| 3 | +
|
3 | 4 | This sketch demonstrates how you can use the Arduino_PowermManagement library to send a board to standby mode by using a GPIO pin and wake it up from another.
|
4 | 5 | This sketch is universal and worksn on both Portenta C33 and H7.
|
| 6 | +
|
5 | 7 | On the the Portenta C33 you can select any of the supported pins (A0, A1, A2, A3, A4, A5, D4, D7) to wake up the board from standby mode,
|
6 |
| - but on the Portenta H7 only GPIO0 can be used to wake up the board from standby mode. GPIO0 is available through the High Density Connectors and you need a breakout board to access it. |
| 8 | + but on the Portenta H7 only GPIO0 can be used to wake up the board from standby mode. GPIO0 is available trough the High Density Connectors and you need a breakout board to access it. |
7 | 9 |
|
8 | 10 | Requirements:
|
9 |
| - - Arduino Portenta C33, Arduino Portenta H7 |
10 |
| - - Arduino IDE / Arduino CLI |
11 |
| - - PowerManagement library (installable from the Arduino Library Manager) |
12 |
| -Usage: |
13 |
| - - Connect a button to GOTO_SLEEP_PIN and with a pull-up resistor to 3.3V |
14 |
| - - Connect a button to pin PORTENTA_C33_WAKEUP_PIN if you are using the Portenta C33 or GPIO0 if you are using a Portenta H7 and with a pull-up resistor to 3.3V |
15 |
| - (If you need information about how to wire the buttons check this link: https://docs.arduino.cc/built-in-examples/digital/Button/) |
16 |
| - - Upload the provided sketch to the board |
17 |
| - - Press the button connected to GOTO_SLEEP_PIN to put the board into standby mode |
18 |
| - - Press the button connected to PORTENTA_C33_WAKEUP_PIN or GPIO0 to wake up the board from standby mode |
19 |
| - - The LED will blink every second to show that the board is awake when not in standby mode |
20 |
| - |
21 |
| - Initial author: Cristian Dragomir ([email protected]) |
| 11 | + - Arduino Portenta C33, Arduino Portenta H7 |
| 12 | + - Arduino IDE / Arduino CLI |
| 13 | + - PowerManagement library (installable from the Arduino Library Manager) |
| 14 | +
|
| 15 | + Usage: |
| 16 | + - Connect a button to GOTO_SLEEP_PIN and with a pull-up resistor to 3.3V |
| 17 | + - Connect a button to pin PORTENTA_C33_WAKEUP_PIN if you are using the Portenta C33 or GPIO0 if you are using a Portenta H7 and with a pull-up resistor to 3.3V |
| 18 | + (If you need information about how to wire the buttons check this link: https://docs.arduino.cc/built-in-examples/digital/Button/) |
| 19 | + - Upload the provided sketch to the board |
| 20 | + - Press the button connected to GOTO_SLEEP_PIN to put the board into standby mode |
| 21 | + - Press the button connected to PORTENTA_C33_WAKEUP_PIN or GPIO0 to wake up the board from standby mode |
| 22 | + - The LED will blink every second to show that the board is awake when not in standby mode |
| 23 | + |
| 24 | + Original author: C. Dragomir (http://arduino.cc) |
22 | 25 | */
|
23 | 26 |
|
24 | 27 | #include "Arduino.h"
|
|
0 commit comments