Onions:
tushev.org // Simon Tushev#include <avr/wdt.h> // include the library
void setup(){
wdt_enable(WDTO_2S); //Set up the watchdog timer. If it isn't reset every 2 seconds, the arduino will reset
}
void loop(){
wdt_reset(); //Reset the watchdog
}
Onions.
Thanks Onions
So the wdt_reset(); command in the loop actually stops the reset from occurring.
I could therefore write a IF/ELSE statement that normally runs the wdt_reset(); command, but say every hour it runs delay(3000) instead which should provide sufficient time for the reset to occur.