I have a code that is working fine using WatchDog timer to auto reset in case something goes wrong, but now i got a arduino with ATMega328PB, and the old code just don't active the watchdog.
#include <avr/wdt.h>
wdt_enable(WDTO_8S);
for(int i = 0; i < 10; i++)
{
delay(1000);
}
This is the code to test, but the reset that should happen just doesn't happen.
In the datasheet say that the watchdog still there to use, but i have no idea how to active it now.
couldn't compile it... what does that mean? ... what error did you get? – jsotola Jul 03 '23 at 22:45__watchdog_reset();there are 3 functions that I don't know how to replace or implement to keep the code functional, and there is also how to set the watchdog time – Christian Beregula Jul 06 '23 at 20:10