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