Deep sleep rtc
Posted: Sun Oct 04, 2020 12:34 pm
Hello people,
Im trying to make a device that falls into deep sleep after a button press.
That device will wake up after another press of the same button, so I attach and detach an gpio interrupt to the wakeup and sleep function of the esp.
What I want to achieve is to have a variable that gets incremented every one second so I can know how much time has elapsed since the device first was powered.
Now, I think that I could make a wakeup timer to wake up the esp every second, increment a variable, and put the esp to sleep again, but I think that this is not a good solution.
Does anybody know another method?
Thank you
Im trying to make a device that falls into deep sleep after a button press.
That device will wake up after another press of the same button, so I attach and detach an gpio interrupt to the wakeup and sleep function of the esp.
What I want to achieve is to have a variable that gets incremented every one second so I can know how much time has elapsed since the device first was powered.
Now, I think that I could make a wakeup timer to wake up the esp every second, increment a variable, and put the esp to sleep again, but I think that this is not a good solution.
Does anybody know another method?
Thank you