Skip to content

Commit bbf1549

Browse files
committed
ExternalWakeup: LowPowerMode parameter SLEEP_MODE should be used
Last parameter of attachInterruptWakeup(), aka "LowPowerMode", should match lowpower state used (in this case LowPower.sleep()) Fixes #54 Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
1 parent 9e7829f commit bbf1549

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/ExternalWakeup/ExternalWakeup.ino

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ void setup() {
3333
// Configure low power
3434
LowPower.begin();
3535
// Attach a wakeup interrupt on pin, calling repetitionsIncrease when the device is woken up
36-
LowPower.attachInterruptWakeup(pin, repetitionsIncrease, RISING);
36+
// Last parameter (LowPowerMode) should match with the low power state used: in this example LowPower.sleep()
37+
LowPower.attachInterruptWakeup(pin, repetitionsIncrease, RISING, SLEEP_MODE);
3738
}
3839

3940
void loop() {

0 commit comments

Comments
 (0)