Chat freely about anything...

User avatar
By WStan
#22856 ESP8266-01 Test in Arduino.ide for ESP
code:

Code: Select allint Count=0;
int led = 0;

void setup() {         
Serial.begin(115200);
pinMode(led, OUTPUT);     
}
void loop() {
  digitalWrite(led, HIGH);   
  delay(500);               
  digitalWrite(led, LOW);   
  delay(500);             
Count++;
Serial.print(Count);
Serial.println(" times");
}

Results:
1. Wireless Router LinkSys WRTU54G is On: Counter reaches 30 and WDT reset is executed
2. Wireless Router LinkSys WRTU54G is Off: Counter increases, no WDT reset is executed

What can I do for avoiding WDT Resets?
Last edited by WStan on Fri Jul 10, 2015 1:30 pm, edited 4 times in total.
User avatar
By WStan
#22912 With wdt_disable (); the program stops after 50 seconds.
Above listed Led Blink program is just the example. The problem is that the system periodically resets itself every few seconds, and only when my home wifi router is turned on., No matter what the program is executed.
Last edited by WStan on Fri Jul 10, 2015 1:38 pm, edited 1 time in total.
User avatar
By burkmurray
#22928 When you say "router," do you mean your WiFi AP? And does your code #include any libraries, or did you quote all of it above?

My guess is that the ESP8266 is trying to connect to your WiFi and failing because the library isn't loaded. Try adding:

Code: Select all#include <ESP8266WiFi.h>


You may also need to set WiFi.mode.