Skip to content

fix(ExternalWakeup): customization may be needed depending on button implementation #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions examples/ExternalWakeup/ExternalWakeup.ino
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
battery life significantly.

In this sketch, pressing a pushbutton attached to pin will wake up the board.
Warning: depending on boards, and its button hardware implementation,
it may be required to adapt INPUT_PULLUP/INPUT_PULLDOWN parameter
in pinMode(pin, XXX)

This example code is in the public domain.
*/
Expand All @@ -28,6 +31,7 @@ const int pin = USER_BTN;
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
// Set pin as INPUT_PULLUP to avoid spurious wakeup
// Warning depending on boards, INPUT_PULLDOWN may be required instead
pinMode(pin, INPUT_PULLUP);

// Configure low power
Expand Down