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

Moderator: igrr

User avatar
By penatenjoe
#16964 Finally I was able to solve the issue myself.
After some searching I came to the conclusion that the package on github is outdated. Merging the new files according to the post mentioned above into the IDE broke something. Even the blink example would create the compile error. I settled on https://github.com/sandeepmistry/esp8266-Arduino which had a more recent release package. With that the code does compile.
User avatar
By MikeAlport
#17621 I have been playing with the WDT on the new 1.6.4 IDE using the program below.
If tock is 5000 then the ESP reboots continuously.
Whereas if tock is 1000 then it does not reboot.
It would seem that ANY passage through the execution Loop effectively does a a WDTfeed, without actually explicitly calling this function.
Not an unreasonable behavior, but it would be nice if someone had documented it.

Code: Select all// Testing Watch Dog Timer
// 3 bells if rebooted
// Do not use Delay in loop - this feeds the watchdog???

long ticks = 0;
long tock = 5000;
byte bell = 13;

void setup() {
  Serial.begin(115200);
  delay(10);
  pinMode(bell, OUTPUT);
  ESP.wdtEnable();
  Serial.println("Rebooting...");
  bells(3);
}

void bells(byte nbells) {
  for (int i = 0; i < nbells; i++) {
    digitalWrite(bell, HIGH);
    delay(500);
    digitalWrite(bell, LOW);
    delay(500);
  }
}

void loop() {
  while (millis() <= ticks + tock) {
    ticks = millis() + tock;
  }
}