I am trying to implement a basic software-based watchdog based on Particle’s Application watchdog.
In order to test it very simply I uploaded the following code to a Photon:
ApplicationWatchdog wd(30000, System.reset); //(Automatic reset after 30 seconds of inactivity)
long uptime;
void setup() {
Particle.variable("Up-time", uptime);
}
void loop() {
//wd.checkin();
uptime = (millis() / 60000);
}
Since the wd.checkin() is commented out, I was expecting the watchdog to kick in and reset the Photon every 30 seconds. However, the Photon keeps in counting up happily the minutes it is running.
What am I missing here?