| Command | Arguments | Return Value | Operation |
|---|---|---|---|
WDT_DISABLE() | None | void | Stops the Watchdog. |
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); }
WDT() where it always executes unconditionally.