A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By BluCode
#52494 I am currently working on a smartwatch with the Adafruit Huzzah ESP8266 dev board, and nodemcu lua. The watch will be in deep sleep for most of the time, waking every five minutes to update some values, etc. The user will wake the watch by pressing a button which will change the value of the reset pin so that the watch will wake on the press of the button, unlike how it wakes on the release of the built-in button.

The button the user presses will also toggle a gpio pin, allowing the program to detect whether the user woke it or it woke itself from deepsleep. I am using the rtctime module to keep track of time. My issue is that if the user manually wakes the watch from deep sleep, the rtctime value is incremented by the length I told it to sleep, not the actual time it slept. I need a way to track the length of the deep sleep, so the watch can keep time accurately when woken. Also, if I could measure the time of the sleep, it would make it much easier to distinguish between the user waking the watch, and a regular wake.

Thanks for your assistance!