Sleep
-
Hello,
My node go sleep by "sleep(digitalPinToInterrupt(DIGITAL_INPUT_SENSOR), CHANGE, SLEEP_TIME);"
But when is wakeup
how to know the trigger ? (digital_input or sleep_time)Thanks for your help.
Jean-luc
-
Hi @jlb, welcome to the forum!
You look at the return value of the sleep function. From the documentation:
Returns the interrupt number if wake up was triggered by pin change, MY_SLEEP_NOT_POSSIBLE if sleep was not possible and MY_WAKE_UP_BY_TIMER if timer woke it up.
-
Thanks
I will try
3 out of 3
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
Saving last known good state, but not in EEPROM
Development • 30 Jan 2024, 18:46 • OldSurferDude 15 Jan 2025, 08:51 -
Gateway without a radio
Development • 12 Jan 2025, 23:19 • OldSurferDude 14 Jan 2025, 22:07 -
Radio waking up for no reason.
Development • 4 Jul 2020, 21:09 • Sasquatch 15 Jan 2025, 08:33 -
Adding Listen only device to my system.
Development • 26 Feb 2025, 00:39 • dpcons 26 Feb 2025, 06:26 -
Sending offset to node
Development • 31 Jan 2025, 00:59 • bsl88k 4 Feb 2025, 12:14