Chat freely about anything...

User avatar
By asfyra
#33641 As I read from the Internet, the parameter that holds the time to put the ESP to deep sleep is a uint32_t, with a max value of 4,294,967,295 microseconds. This translates to something like more than an hour.
For my project I need the ESP to wake up only once a day. How would you accomplish something like this?

Thanks in advance
Alex
User avatar
By DrG
#33648
asfyra wrote:As I read from the Internet, the parameter that holds the time to put the ESP to deep sleep is a uint32_t, with a max value of 4,294,967,295 microseconds. This translates to something like more than an hour.
For my project I need the ESP to wake up only once a day. How would you accomplish something like this?

Thanks in advance
Alex


Try having it sleep for 60 minutes, wake up, increment a counter and go back to sleep unless the counter is at 24. Then it does it's thing and resets the counter before going back to sleep.

Alternatively, if you need more exact wake up times or more flexibility, you can use an external RTC (with a coin cell) power up the ESP to do its thing and then your ESP code turns off the alarm and powers off...until the RTC wakes it up again. That approach is being discussed at some length in this thread: viewtopic.php?f=13&t=5747

Hope this is of some help.

DrG