I am using 328P with arduino. I enabled watchdog in the setup() .I reset it in the loop. but when once the watchdog reset is hit. it needs to be disabled as said in other threads. But I am not able to do so. please guide me.
#include <avr/wdt.h>
void setup() {
wdt_disable();
// put your setup code here, to run once:
// my setup code here
wdt_enable(WDTO_8S);
}
void loop() {
wdt_reset();
// my code here.
}