Skip to content

Commit 1a17d41

Browse files
ABOSTMfpistm
authored andcommitted
fix(ExternalWakeup): customization may be needed depending on button implementation
Warning: depending on boards, and its button hardware implementation, it may be required to adapt INPUT_PULLUP/INPUT_PULLDOWN parameter in pinMode(pin, XXX) Signed-off-by: Alexandre Bourdiol <[email protected]>
1 parent 8d717bf commit 1a17d41

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/ExternalWakeup/ExternalWakeup.ino

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
battery life significantly.
99
1010
In this sketch, pressing a pushbutton attached to pin will wake up the board.
11+
Warning: depending on boards, and its button hardware implementation,
12+
it may be required to adapt INPUT_PULLUP/INPUT_PULLDOWN parameter
13+
in pinMode(pin, XXX)
1114
1215
This example code is in the public domain.
1316
*/
@@ -28,6 +31,7 @@ const int pin = USER_BTN;
2831
void setup() {
2932
pinMode(LED_BUILTIN, OUTPUT);
3033
// Set pin as INPUT_PULLUP to avoid spurious wakeup
34+
// Warning depending on boards, INPUT_PULLDOWN may be required instead
3135
pinMode(pin, INPUT_PULLUP);
3236

3337
// Configure low power

0 commit comments

Comments
 (0)