-->
Page 1 of 1

force nightly reboot

PostPosted: Tue Nov 26, 2019 11:42 pm
by tullyHott
this code works great for my nodeMCU esp8266 https://github.com/thehookup/Wireless_M ... FIGURE.ino
but for whatever reason, the board would "die" after 3 or 4 days. my router says it is still connected but the board does not work. after pulling the plug, it works again as before.
now, how can i force a nightly reboot? or force a reboot after 24 hours to not rely on a NTP timer server.
someone suggested i added this code at the end but it does not work:
You can use millis(). The 8266 starts counting milliseconds on boot.
if (millis() => 86400000){
ESP.restart();
}