diff --git a/lamp_switch/lamp_switch.ino b/lamp_switch/lamp_switch.ino index 27824a6..c5db493 100644 --- a/lamp_switch/lamp_switch.ino +++ b/lamp_switch/lamp_switch.ino @@ -80,6 +80,7 @@ ISR(PCINT0_vect) { } ISR(WDT_vect) { + disableWdt(); debug("wdt"); byte state = digitalRead(SWITCH); if (state == LOW) { @@ -87,7 +88,6 @@ ISR(WDT_vect) { } else { sendCommand(true); } - disableWdt(); } void sleep() {