A simple watchdog for Digispark (Attiny85)

Hi! I’ve found some documentation about it, but with lot of complicated staff that I don’t need. I’m just looking for something simple, like this:

#include <avr/wdt.h>

void setup () {
wdt_enable(WDTO_2S);
}

void loop () {
wdt_reset();
}

I see 2 problems, wdt_reset(); doesn’t extend the watchdog, 2 seconds after the bootloader ends the controller stops. It stops (P1 output was high and became low) and doesn’t reboot.
Thanks

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.