Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By Orcanbull
#53974
picstart wrote:I found if I add this code to the setup then the sketch above will run more than just a few dozen cycles before failing.

wifi_station_disconnect();
wifi_set_opmode_current(NULL_MODE);

I suspect the esp8266 has recorded its connection status as it sleeps and it wakes up the wifi hardware has necessary things to do that result in failure after a few dozen cycles.


Hi picstart,

Indeed i had the same problem therefore i commented it out. I did work for me at one time, but then the current that was drawn was higher again. Also this requires the ESP to connect again after wake up which takes time and more power then when you leave it on during sleep