Skip to content
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

Use wake up pin that is not dependent on analog power #3

Merged
merged 4 commits into from
Aug 30, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Use digital pin for wake up
  • Loading branch information
sebromero committed Aug 22, 2024
commit 9957eaabd8ebbf49c25237d7fd95ed31fbd44da7
9 changes: 8 additions & 1 deletion examples/WakeFromPin/WakeFromPin.ino
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@

// #define TURN_PERIPHERALS_OFF // Uncomment this line to turn off the peripherals before going to sleep
#define SLEEP_PIN D0 // Pin used to put the device to sleep
#define WAKE_PIN A3 // Pin used to wake up the device

/*
The following pins can be used to wake up the device: A0, A1, A2, A3, A4, A5, D4, D7
However turnPeripheralsOff() in this sketch turns off the power lane of the analog pins.
This means they cannot sink current and therefore cannot be used to wake up the device.
Hency only D4 and D7 can be used to wake up the device in this configuration.
*/
#define WAKE_PIN D4

LowPower lowPower;
bool shouldSleep = false;
Expand Down
Loading