ESP32 development board is one of the popular board across the IOT developer community. It is because the board itself packed with two built-in communication features, Wifi and Bluetooth (BLE). When programming a controller, sometimes we need to add the restart feature that let the user manually restart or reset the board.
Below is the code to restart the board:
esp_task_wdt_init(1,true); esp_task_wdt_add(NULL); while(true);
Also include these two header files:
#include <esp_int_wdt.h> #include <esp_task_wdt.h>by