if (now() >= 180) {
ESP.restart(); //why don't you work?!?
}
Doesn't that reboot the ESP every 3 minutes ?
Explore... Chat... Share...
Moderator: igrr
if (now() >= 180) {
ESP.restart(); //why don't you work?!?
}
mrburnette wrote:If you are receiving 'electrical shocks', you have a very serious health issue.
Guillaume wrote:I'm beginner but, I see this in your code:Code: Select allif (now() >= 180) {
ESP.restart(); //why don't you work?!?
}
Doesn't that reboot the ESP every 3 minutes ?
lmerega wrote:Could you point me to some examples using delay(0) or yeld?
I am resetting the board every 10 minutes in this moment... and it is working... but it is really bad.
.luca
void loop() {
static unsigned long l = 0; // only initialized once
unsigned long t; // local var: type declaration at compile time
t = millis();
if((t - l) > 5000) { // update temp every 5 seconds
analogSample(); yield();
webSocket.sendTXT(socketNumber, "wpMeter,Arduino," + temp_str + ",1");
l = t; // typical runtime this IF{} == 300uS - 776uS measured
Serial.print( ADCvalue);Serial.println(": " + temp_str + "F");
yield();
}
server.handleClient();
webSocket.loop();
}
It takes about 20-25 seconds for home assistant c[…]
I tried to upgrade tof my sonoff basic R2 with the[…]
a problem Perhaps you want to define "Probl[…]
Rebooting your router will not give you a faster I[…]
There are no other notifications from esptool.py i[…]
Using the Arduino IDE, you'll learn how to set up […]
In this project, you will post to Twitter using an[…]
In this project, we will build a water level contr[…]
I guess I'm late, but I had the same problem and f[…]
Last night I received my first D1 Minis for a lear[…]
Although I am aware that this is an old post, I fe[…]