-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Watchdog didn't work or i cannot use it? #3785
Comments
That's not how the watchdog works. The watchdog is fed every time loop() is run, every time you call delay() and many libraries also include watchdog-feeds in long-running functions. |
This is my code. How can i integrate watchdog to it? Can you help me? sensors.begin(); Serial.begin(115200); } void send_pir() {
} else {
} //----------------------------------------------------------------------------------- void calibrate_termostat() { void send_zavlaha() { WiFiClientSecure client; void calibrate_zavlaha() { void get_zavlaha() { while (client.connected()) { while (client.connected()) { void loop() { get_zavlaha(); } |
@martinius96 there are two watchdogs: a hardware and a software. Neither is really meant to be setup and used by you, at least not in the way you seem to want. |
#ISSUE
@igrr
Hello there, i tried these ESP. functions for watchdog but i dont know how it works.. I put in setup that:
ESP.wdtEnable(WDTO_2S);
At the end of loop i take that:
ESP.wdtFeed();
My loop working time is circa 6 seconds for one loop. I enabled wdt for 2 seconds and it didnt reset my NodeMCU v3 Lolin. I only want to reset my board to see if it is working if code is running more than 2 seconds.. Where is problem? Maybe i bad think about how it functions I want that: if my board lags (stops working) it will reset my board automatically. I am using HTTPS requests to webpage (IoT house) for upload and download values and full automatization. It takes 6 seconds together. Thanks for help! #
The text was updated successfully, but these errors were encountered: