====== WDT_DISABLE() ====== ''WDT_DISABLE()'' stops the Watchdog. {{:en-us_commands:reference:wdt_disable.svg?900|WDT_DISABLE command operation flow}} ''void WDT_DISABLE()'' ===== Commands ===== ^ Command ^ Arguments ^ Return Value ^ Operation ^ | ''WDT_DISABLE()'' | None | ''void'' | Stops the Watchdog. | ===== Example ===== This example uses MPINO-16A8R8T digital input D22. When D22 becomes HIGH, it disables the watchdog once and does not enable it again. bool watchdogActive = true; void setup() { WDT_ENABLE(WDT_2S); // Start the two-second watchdog. } void loop() { if (watchdogActive && digitalRead(22) == HIGH) { WDT_DISABLE(); // Disable the watchdog when D22 becomes HIGH. watchdogActive = false; } if (watchdogActive) WDT(); // Feed the watchdog only while it is active. delay(100); } ===== Precautions ===== * Use time constants supported by the MCU. * Do not set a timeout shorter than the longest normal processing time. * Do not hide program faults by placing ''WDT()'' where it always executes unconditionally. ===== Built-in Commands in the Same Category ===== * [[:en-us_commands:reference:wdt_enable|WDT_ENABLE() View detailed description]] * [[:en-us_commands:reference:wdt|WDT() View detailed description]] [[:en-us_commands:builtin|← Built-in Command List]]