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
1 out of 3
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
Home Assistant/MySensors quirks
Development • 17 Mar 2025, 02:35 • OldSurferDude 17 Mar 2025, 02:35 -
Counting Incoming and Outgoing Messages from a Gateway
Development • 10 Dec 2024, 21:57 • Trand 14 Dec 2024, 20:23 -
Gateway without a radio
Development • 12 Jan 2025, 23:19 • OldSurferDude 14 Jan 2025, 22:07 -
PJON and Minicore not working
Development • 21 Mar 2025, 19:51 • Trand 21 Mar 2025, 19:51 -
Radio waking up for no reason.
Development • 4 Jul 2020, 21:09 • Sasquatch 15 Jan 2025, 08:33