WIFIO is a dual Arduino WIFI module (ESP8266+ATMEGA328P) FCC approve-able with transferable licence. Can use the 328P for I/O expansion also...

Moderator: igrr

User avatar
By txsrooster
#85607 I am trying to write a code that uses a variable for deep sleep. I want to be able to change the deep sleep duration remotely depending on sensor data. basically it is just

Code: Select alllong sleepTime = 60000
ESP.deepSleep (sleepTime);


This should put the ESP into deep sleep for 1 min, but it basically just goes into deep sleep and immediately wakes up and reconnects then wash, rinse, repeat.
Is the ESP capable of utilizing a variable for the deep sleep duration?
User avatar
By txsrooster
#85625
schufti wrote:Deepsleep duration is us not ms, so you are off a factor 1000

Oh. Thanks for the info. Still trying to find out if the deep sleep can use a variable to determine duration.