This code serves is an output from the YouTube video ESP32 Provisioning - One-Click Config. 👉 Subscribe to the OhioIoT YouTube Channel for more on All Things IoT: hardware, firmware, connectivity, cloud computing, and dev toolkit.
git clone https://github.com/OhioIoT-ESP32-Provisioning-Examples/One-Click-Config.git
- compile and run
- copy /src/main.cpp into a new sketch one-click/one-click.ino (or whatever name you choose)
- copy all of the folders inside of lib/ into the /libraries folder that holds all of your Arduino IDE libraries
- compile and run
- add the right SSID and password values to your .env_template file
- rename .env_template -> .env
- create a shortcut to call the bash script
- click on the shortcut
OhioIoT is an IoT platform designed for small-scale IoT projects (https://www.ohioiot.com).
10/18/25 - WiFi.begin() will put the WiFi in WIFI_STA mode automatically if it comes from WIFI_OFF. However, if the device is coming from WIFI_AP mode, WiFi.begin() will apparently put it in WIFI_AP_STA mode, and leave the DEVICE_PROVISIONING SSID active. So, best to explicitly call WiFi.mode(WIFI_STA) before WiFi.begin() in src/main.cpp.