How to enable Watchdog on ESP8266/ESP32 using PlatformIO

You can enable the watchdog on the ESP8266 or ESP32 using

example.cpp
ESP.wdtEnable(5000);

where 5000 is the number of milliseconds until the watchdog times out.

Call

example.cpp
ESP.wdgFeed();

periodically to reset the watchdog.


Check out similar posts by category: ESP8266/ESP32, PlatformIO