WDT reset on delay() ?

Hi boys,
please, can you help me? I ´am using sketch with wdt timer ON. Is possible to reset wdt timer in delay() function?
When I call delay(5000), my wdt is overrun.
Is any other way to reset wdt in delay as use 5x 1000mS delay with wdt_reset() after every seconds?

Many thanks,
Petr

Is any other way to reset wdt in delay as use 5x 1000mS delay with wdt_reset() after every seconds?

No. Screwing around with smaller values in the call to delay() is not the answer either. Reading, understanding, and embracing the blink without delay example is.

OK, thanks :slight_smile: But it´s not easy solution of simple problem :-)))))))

So, I will be experimenting with timing of main loop :slight_smile: But only in my second program... today I have made multiple delays of one second...

I created a nice function for it :slight_smile:

void delayS(int number)
{
     for (int i=0; i < number; i++){
    wdt_reset(); // reset the wdt
    delay(1000);               // wait for a second
     }  
}