-->
Page 1 of 1

Use delay() to pause ESP and allow sleep for set duration?

PostPosted: Wed Apr 26, 2017 1:31 am
by BlitzSSS
Hi All

What's the best way to pause the ESP to allow it to go into a low power Modem-Sleep/Light-Sleep mode for a set duration of time?

My projects typically run 1 loop cycle then sleep for 1 minute and currently im using delay() to achieve this. (well actually I have a while loop for the entire duration but splits the delay() into smaller 5 second intervals to allow the ArduinoOTA.handle() function to be called and keep OTA happy).

Is there a more proper way to do this?

Thanks

Re: Use delay() to pause ESP and allow sleep for set duratio

PostPosted: Thu May 04, 2017 2:44 am
by BlitzSSS
Bump

Re: Use delay() to pause ESP and allow sleep for set duratio

PostPosted: Thu May 04, 2017 7:47 am
by btidey
Check out this issue thread which discusses light and modem sleep.

https://github.com/esp8266/Arduino/issues/1381