#ifdef USE_WATCHDOG #include #include volatile uint8_t timeout_seconds=0; void(* ctrlaltdelete) (void) = 0; //does not work on my atmega2560 //Watchdog timer interrupt, called if main program blocks >1sec ISR(WDT_vect) { if(timeout_seconds++ >= WATCHDOG_TIMEOUT) { #ifdef RESET_MANUAL LCD_MESSAGE("Please Reset!"); ECHOLN("echo_: Something is wrong, please turn off the printer."); #else LCD_MESSAGE("Timeout, resetting!"); #endif //disable watchdog, it will survife reboot. WDTCSR |= (1<