How to enable Watchdog on ESP8266/ESP32 using PlatformIO
You can enable the watchdog on the ESP8266 or ESP32 using
ESP.wdtEnable(5000);
where 5000
is the number of milliseconds until the watchdog times out.
Call
ESP.wdgFeed();
periodically to reset the watchdog.