I know it's a bit different in ESP8266, but it should still be possible to sleep in there - and then it behaves the same as other Espruino devices. You just call setDeepSleep(1) and from then on it does deep sleep whenever it can.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
IMO that code should really go into
jshSleep
- if you look at the STM32 port it basically does:I know it's a bit different in ESP8266, but it should still be possible to sleep in there - and then it behaves the same as other Espruino devices. You just call
setDeepSleep(1)
and from then on it does deep sleep whenever it can.