Close Menu
Circuit of Things
  • Home
  • About Us
  • Contact Us
  • 3D Print
  • Shop Now !
  • Projects
    • Raspberry Pi Projects
    • Arduino Projects
    • ESP8266 Projects
    • ESP32 Projects
    • IoT Tutorials
    • Sensors & Modules
    • IoT Basics
  • KSP Tools

Get Free Tutorials & Discounts!

Subscribe for the latest IoT tutorials and exclusive KSP Electronics discount codes.

Instagram WhatsApp
  • Terms and Conditions
  • Disclaimer
  • Privacy Policy
  • Contact Us
Circuit of Things Circuit of Things
  • Home
  • About Us
  • Contact Us
  • 3D Print
  • Shop Now !
  • Projects
    • Raspberry Pi Projects
    • Arduino Projects
    • ESP8266 Projects
    • ESP32 Projects
    • IoT Tutorials
    • Sensors & Modules
    • IoT Basics
  • KSP Tools
Hire us
Circuit of Things
Home»ESP32 Projects»ESP32 OTA Updates: Program Your Board Over Wi-Fi with Arduino IDE
ESP32 Projects

ESP32 OTA Updates: Program Your Board Over Wi-Fi with Arduino IDE

Sai Preetham KoyyalaBy Sai Preetham KoyyalaMay 4, 2026Updated:May 7, 2026No Comments2 Mins Read
Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
Share
Facebook Twitter LinkedIn Pinterest Email
Contents
  • Introduction
  • How OTA Works
  • Step 1: Install Required Tools
  • Step 2: Upload the OTA Base Code
  • Step 3: Upload Over Wi-Fi
  • Security Tip
  • Conclusion

Introduction

OTA (Over-The-Air) updates allow you to upload new firmware to your ESP32 over Wi-Fi, without physically connecting a USB cable. This is a game-changer for deployed IoT projects — imagine updating the code on a sensor mounted on your roof without climbing up to get it!

How OTA Works

The ESP32 runs a small OTA server in the background. When you upload from the Arduino IDE, it sends the compiled binary over your local Wi-Fi network directly to the ESP32, which writes it to flash and reboots into the new code.

Step 1: Install Required Tools

OTA requires Python 3 on your computer. Install it from python.org. The ESP32 Arduino core includes the necessary OTA libraries automatically.

Step 2: Upload the OTA Base Code

This code must be uploaded once via USB. After that, all future updates go over Wi-Fi.

#include <WiFi.h>
#include <ArduinoOTA.h>
const char* ssid = "YOUR_SSID";
const char* password = "YOUR_PASSWORD";
void setup() {
  Serial.begin(115200);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) delay(500);
  Serial.println("IP: " + WiFi.localIP().toString());
  ArduinoOTA.setHostname("esp32-iot-device");
  ArduinoOTA.setPassword("your_ota_password");
  ArduinoOTA.onStart([]() { Serial.println("OTA Start"); });
  ArduinoOTA.onEnd([]() { Serial.println("nOTA Done!"); });
  ArduinoOTA.onProgress([](unsigned int prog, unsigned int total) {
    Serial.printf("Progress: %u%%r", (prog / (total / 100)));
  });
  ArduinoOTA.onError([](ota_error_t error) {
    Serial.printf("Error[%u]n", error);
  });
  ArduinoOTA.begin();
  Serial.println("OTA Ready!");
}
void loop() {
  ArduinoOTA.handle(); // Must be called every loop!
  // Your normal code here...
  delay(1000);
}

Step 3: Upload Over Wi-Fi

  1. After uploading the base code via USB, open the Arduino IDE.
  2. Go to Tools > Port — you will now see a network port listed as your ESP32’s hostname.
  3. Select it and upload your new sketch normally. It will transfer over Wi-Fi!

Security Tip

Always set a strong OTA password with ArduinoOTA.setPassword(). Without a password, anyone on your network can overwrite your ESP32 firmware.

Conclusion

OTA updates are essential for any production IoT deployment. Once set up, you will never need to physically access your ESP32 again for firmware updates.

Related Tutorials

  • How to Install Arduino IDE on Windows and Mac: Step-by-Step Guide with ESP32, ESP8266 Integration and CH340 Driver Setup
  • ESP32 MH-Z19B: Building a DIY CO₂ Monitor for Smarter Air Quality Projects
  • Choosing the Right Microcontroller: ESP32 vs. ESP8266 Comparison
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Previous ArticleLDR Light Sensor with Arduino: Auto Night Light Project
Next Article Arduino Servo Motor Control: Sweep, Potentiometer and Button Projects
Sai Preetham Koyyala
  • Website
  • Facebook
  • X (Twitter)
  • Instagram
  • LinkedIn

Hello, I am Sai Preetham Koyyala. I'm an electronics engineer by profession, a DIY enthusiast by passion. ESP32 and Arduino are the main topics of my work.

Related Posts

ESP32 Projects

Step-by-Step Guide: Interface DHT11 and DHT22 Sensors with ESP32

May 6, 2026
ESP32 Projects

An Introduction to the ESP32 Development Board

May 6, 2026
ESP32 Projects

The Complete ESP32 Pinout Guide: Which Pins to Use?

May 6, 2026
Add A Comment
Leave A Reply Cancel Reply


⚡

Circuit of Things

Free IoT tutorials & electronics projects — powered by KSP Electronics.

📸 Instagram 💬 Community
✓ Official Partner Store

Everything for Your
Next IoT Build

Boards, sensors, modules & kits — fast delivery across India.

ESP32 Arduino Sensors Raspberry Pi 3D Print
🛒 Shop KSP Electronics →
Top Posts

Raspberry Pi: How to Control a DC Motor with L298N and PWN on a Web Server

July 14, 2023

Step-by-Step Guide: Interface DHT11 and DHT22 Sensors with ESP32

May 6, 2026

Esp8266 / NodeMCU Pinout: A Comprehensive Guide for Beginners

June 25, 2023
Available for Projects

Hire Us for IoT Development

End-to-end solutions for your needs:

  • → ESP32 & Embedded Systems
  • → LoRaWAN & Cloud Dashboards
  • → Custom Hardware Design
  • → IoT Product Prototyping
View Services →

Get Free Tutorials & Discounts!

Subscribe to get the latest IoT tutorials and exclusive hardware discount codes for KSP Electronics delivered directly to your inbox.

Follow Us
  • Instagram
  • Telegram
About Circuit of Things

We are a community-driven engineering platform dedicated to IoT, Robotics, and DIY electronics tutorials.

Proudly partnered with KSP Electronics.

Quick Links
  • Home
  • ESP32 Projects
  • Arduino Projects
  • IoT Tutorials
  • Sensors & Modules
  • Shop on KSP Electronics
  • Electro Calc
Legal & Support
  • Terms and Conditions
  • Disclaimer
  • Privacy Policy
  • Contact Us
📩

Get Free Tutorials & Discounts!

Subscribe for IoT tutorials and exclusive KSP discount codes.

Subscription Form


By subscribing, you agree to our Privacy Policy. No spam, ever.

X (Twitter) Instagram YouTube WhatsApp
  • Terms and Conditions
  • Disclaimer
  • Privacy Policy
  • Contact Us
© 2026 Circuit of Things. Designed by Sai Preetham Koyyala.

Type above and press Enter to search. Press Esc to cancel.