Over-The-Air (OTA) update template for ESP32.
📺 Video Tutorial: https://www.youtube.com/watch?v=1pwqS_NUG7Q
The setupOTA() function replaces WiFi.begin() - do not call both! The setupOTA() function handles WiFi connection internally.
// ❌ Wrong - don't do this
WiFi.begin(ssid, password);
setupOTA("DeviceName", ssid, password);
// ✅ Correct - setupOTA handles WiFi
setupOTA("DeviceName", ssid, password);Create a credentials.h file in the sketch folder:
#pragma once
const char* mySSID = "your-wifi-name";
const char* myPASSWORD = "your-wifi-password";Or comment out #include <credentials.h> and define credentials directly in the sketch.
| Folder | Description |
|---|---|
0TA_Template_Sketch/ |
Basic OTA template |
0TA_Template_Sketch_TelnetStream/ |
OTA with Telnet debugging |