Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Solexious
#46819 I've got a part of my sketch where I use the adc to read my battery voltage, if its too low it should flash a neopixel 4 times then enter deep sleep forever.

Currently the neopixel turns on once and then stays on and the esp goes into sleep mode. It doesn't seen to do all of the steps. I tried enclosing the ESP.deepSleep(0); in an if statement just to see if that would have it run the block of neopixel commands first, then the sleep. (with no luck)

http://dpaste.com/3SZ8SAH

Any ideas whats going on, or how I can stop it?

Sol
User avatar
By Solexious
#46823 So it seemed to be that the ESP.deepSleep(0); and that code was within a Ticker function. I've removed that code block to the main loop with the ticker setting a global shutdown var to true and that code block getting executed when it does.

It not flashes, prints and goes into an indefinite sleep correctly :)

Sol