Hi, I can't find a simple library for doing that, avr/wdt.h doesn'0t work properly, I can't figure out how to searching everywhere, I don't need sleep mode, I just need to reboot in case the CPU hangs for any reason.
Thank you a lot!
This doesn't work, it does one reboot, then stucks.
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/wdt.h>
void setup() {
wdt_enable(WDTO_2S);
}
void loop() {
// wdt_reset();
}