G6EJD / ESP32-e-Paper-Weather-Display

An ESP32 and 2.9", 4.2" or 7.5" ePaper Display reads Weather Underground data via their API and then displays the weather
Other
946 stars 206 forks source link

patch calculation of sleep duration #186

Closed reiyawea closed 1 year ago

reiyawea commented 1 year ago

ESP32 will wake up too early if its RTC runs too fast, which causes extra wake-ups. For example, if it wakes up at 12:29:20, the sleep duration will be 40 seconds and ESP32 will wake up again soon, which results in extra battery consumption. With this patch, waking up at 12:29:20 will result in a sleep duration of 1800+40 seconds. This ensures only one wake-up every 30 minutes.