Closed tommyNy closed 7 years ago
Please visit page https://github.com/prampec/arduino-softtimer/blob/wiki/WhyHow.md#platform-dependent-notes for ESP8266 watchdog workaround.
I also have added an ESP8266 example for you: https://github.com/prampec/arduino-softtimer/blob/master/examples/SoftTimer1TaskESP8266/SoftTimer1TaskESP8266.ino
Ok, thanks. I tested it with disabled watchdog, but better it works with feed function.
Code from examples, but with Serial.println
include
// -- Define method signature. void callBack1(Task me); void callBack2(Task me);
Task t1(2000, callBack1); Task t2(1111, callBack2);
void setup() { Serial.begin(9600);
SoftTimer.add(&t1); SoftTimer.add(&t2); }
void callBack1(Task me) { Serial.println("callBack1"); } void callBack2(Task me) { Serial.println("callBack2"); }
Output: callBack1 callBack2 callBack2 callBack1 callBack2
Soft WDT reset
ctx: cont sp: 3ffef1c0 end: 3ffef3b0 offset: 01b0