ESP32 WiFiManager

Hi guys, I’ve done some modifications to get the ESP32 working with the WiFiManager feature and thinger

You will need the ESP_WiFiManager library

I split the sketch into two files, because the wifimanager example itself takes more than 1k lines, I left all the original options, if somebody wants to play around with them, the WiFiManager code is into the “wm.h” file

If the ESP32 freaks out when upload the code, you need to format the file system, go to wm.h file, line 114 and uncomment the true, comment the false and upload again to get the FS formatted, then you need to left it as the following to allow persist the info stored, if you left the true state, the ESP32 will format the FS on every reboot

// You only need to format the filesystem once
//#define FORMAT_FILESYSTEM       true
#define FORMAT_FILESYSTEM         false

To erase the wifi credentials, you need to uncomment the “wm.h” line 870

  //reset settings - for testing
//  ESP_wifiManager.resetSettings();/////////////////////////////////////////////////////////////////////////////////////////////////

This will erase the wifi credentials and will go directly to the config portal.

The example sketch is here → (9.1 KB)

Hope this helps.