🔰 Introduction
In this lesson, we will set up all the software tools required to program the ESP32 board and test it with a simple LED blink program.
By the end of this lesson, you will be able to:
-
Install Arduino IDE
-
Add ESP32 board support
-
Install USB drivers
-
Connect ESP32 to your computer
-
Upload a basic program
-
Fix common errors
PART 1 – Installing Arduino IDE
Step 1: Download Arduino IDE
-
Open a web browser (Chrome / Edge / Firefox)
-
Search for:
Arduino IDE download -
Open the official Arduino website
-
Download:
-
Windows Installer (for Windows)
-
macOS version (for Mac)
-
Linux version (for Linux)
-
Step 2: Install Arduino IDE (Windows)
-
Open the downloaded
.exefile -
Click I Agree
-
Keep all default options checked
-
Click Next → Install
-
Wait for installation to finish
-
Click Finish
Step 3: Open Arduino IDE
-
Click Start Menu
-
Search for: Arduino
-
Open Arduino IDE
You should now see a coding window.
PART 2 – Adding ESP32 Board Support
Arduino IDE does not support ESP32 by default.
We must add ESP32 manually.
Step 4: Open Preferences
-
In Arduino IDE:
-
Go to File → Preferences
-
Step 5: Add ESP32 Board URL
-
In the field:
Additional Boards Manager URLs -
Paste this URL:
-
Click OK
Step 6: Install ESP32 Board Package
-
Go to: Tools → Board → Boards Manager
-
In search box type:
esp32 -
Select: esp32 by Espressif Systems
-
Click Install
-
Wait until installation completes
-
Close Boards Manager
PART 3 – Installing USB Driver (VERY IMPORTANT)
Most ESP32 boards use either:
-
CP2102
-
CH340
-
CH9102
Without driver → ESP32 will NOT be detected.
Step 7: Connect ESP32 to PC
-
Use a good quality USB cable
-
Connect ESP32 to your computer
Step 8: Check if Port Appears
-
In Arduino IDE:
-
Go to Tools → Port
-
If you see:
-
COM3 / COM4 / COM5 etc. → GOOD
-
Greyed out / No port → Driver missing
Step 9: Install USB Driver (If Port Not Showing)
Search on Google:
-
CP2102 USB driver
-
OR
-
CH340 USB driver
Download and install.
Restart PC after installation.
PART 4 – Selecting Board and Port
Step 10: Select ESP32 Board
-
Go to: Tools → Board
-
Select:
ESP32 Dev Module
OR
DOIT ESP32 DEVKIT V1
(Try either if one fails)
Step 11: Select COM Port
-
Go to: Tools → Port
-
Select the COM port that appeared
PART 5 – Uploading First Program (Blink Test)
Step 12: Open Blink Example
-
Go to: File → Examples → 01.Basics → Blink
Step 13: Modify LED Pin for ESP32
Default Blink uses pin 13 (for Arduino UNO).
ESP32 uses pin 2 (built-in LED).
Replace:
With:
Step 14: Upload Code
-
Click Upload (→)
-
Wait for compiling
-
Wait for uploading
Step 15: If Upload Stuck / Failed
When uploading, if it says:
Then:
-
Press and hold BOOT button on ESP32
-
While holding BOOT → Click Upload
-
Release BOOT when upload starts
PART 6 – Testing Output
Step 16: Observe LED
If setup is correct:
-
Blue LED on ESP32 will blink
-
ON for 1 second
-
OFF for 1 second
PART 7 – Common Errors & Fixes
❌ Error 1: “No COM Port Found”
Cause:
-
USB driver not installed
-
Faulty cable
Fix:
-
Install CP2102 / CH340 driver
-
Change USB cable
-
Change USB port
-
Restart PC
❌ Error 2: “Board Not Found”
Cause:
-
Wrong board selected
-
ESP32 package not installed
Fix:
-
Select correct ESP32 board
-
Reinstall ESP32 board package
❌ Error 3: “Timed out waiting for packet header”
Cause:
-
ESP32 not in boot mode
Fix:
-
Hold BOOT button during upload
❌ Error 4: “Permission Denied / Access is denied”
Cause:
-
COM port busy
-
Another software using port
Fix:
-
Close Serial Monitor
-
Close other Arduino IDE windows
-
Restart IDE
❌ Error 5: “Sketch too big”
Cause:
-
Wrong partition scheme
Fix:
-
Tools → Partition Scheme
-
Select: Default / Huge App
PART 8 – Final Checklist
✔ Arduino IDE installed
✔ ESP32 board package installed
✔ USB driver installed
✔ Board selected
✔ Port selected
✔ Blink code uploaded
✔ LED blinking