Hi, I am trying to implement the WDT by software in a ESP8266 and for this I am using this code:
String bufferStringTX = "";
void setup() {
Serial.begin(115200);
Serial.println();
Serial.printf("Reset reason: %s\n", ESP.getResetReason().c_str());
ESP.wdtDisable();
ESP.wdtEnable(2000);
}
void loop() {
Serial.println("Hit any key to avoid a watchdog timeout");
if (Serial.available() > 0) {
bufferStringTX = Serial.readStringUntil('\n');
Serial.println(bufferStringTX);
ESP.wdtFeed();
}
delay(100);
}
but it seems that it does not work, can someone tell me what is missing?