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

Moderator: igrr

User avatar
By GerryKeely
#16076 Hi
It would appear that the wdt.Feed(wdt.Reset) function does not work after all.I can only get enable and disable to work.
Code: Select allextern "C" {
#include "user_interface.h"
}

void setup(){
//ESP.wdtDisable();
ESP.wdtEnable();
Serial.begin(9600);
}

void loop(){
while(1){
ESP.wdtFeed();
//delay(0);
}
}


when I run attached program data is printed out on the serial port approx. every 3 sec indicating that the watchdog is not being reset. If you comment out the delay(0) and run the program the watchdog resets.
So it would seem ,for now, that you can only indirectly reset the watchdog.

Gerry
User avatar
By penatenjoe
#16821 Hi all,
I tried the example code 2 posts up but I do get compiler errors:
sketch_may06a.ino: In function 'void setup()':
sketch_may06a.ino:7:1: error: 'ESP' was not declared in this scope
sketch_may06a.ino: In function 'void loop()':
sketch_may06a.ino:13:1: error: 'ESP' was not declared in this scope

I downloaded the windows package from github yesterday and the selected board is generic ESP8266. The Wifi object works fine. Looking at the code the Esp.h creates the ESP object. I checked the hardware folder, there's no Esp.h in there. I found the post viewtopic.php?f=29&t=2472 where it says to copy some folders from github into the arduino install folder. Now I get error: call of overloaded 'wdtEnable()' is ambiguous which, looking at Esp.h does make sense since it is defined twice with different argument types. Now changing the sketch to ESP.wdtEnable(WDTO_0MS); solves that but yields just the message "Error compiling".
Anybody able to help me? Thanks.