Course Content
📘 MODULE 6 – Smart Pet Feeder
0/1
📘 MODULE 7 – Smart Water Management System
0/2
📘 MODULE 8 – Water Quality Monitoring System
0/2
📘 MODULE 10 – Gas Leakage Detection System
0/2
Mastering IoT with 11 Real-World Projects and 1 mega project

🔰 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

  1. Open a web browser (Chrome / Edge / Firefox)

  2. Search for:
    Arduino IDE download

  3. Open the official Arduino website

  4. Download:

    • Windows Installer (for Windows)

    • macOS version (for Mac)

    • Linux version (for Linux)


Step 2: Install Arduino IDE (Windows)

  1. Open the downloaded .exe file

  2. Click I Agree

  3. Keep all default options checked

  4. Click Next → Install

  5. Wait for installation to finish

  6. Click Finish


Step 3: Open Arduino IDE

  1. Click Start Menu

  2. Search for: Arduino

  3. 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

  1. In Arduino IDE:

    • Go to File → Preferences


Step 5: Add ESP32 Board URL

  1. In the field:
    Additional Boards Manager URLs

  2. Paste this URL:

 
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
  1. Click OK


Step 6: Install ESP32 Board Package

  1. Go to: Tools → Board → Boards Manager

  2. In search box type:
    esp32

  3. Select: esp32 by Espressif Systems

  4. Click Install

  5. Wait until installation completes

  6. 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

  1. Use a good quality USB cable

  2. Connect ESP32 to your computer


Step 8: Check if Port Appears

  1. 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

  1. Go to: Tools → Board

  2. Select:
    ESP32 Dev Module
    OR
    DOIT ESP32 DEVKIT V1
    (Try either if one fails)


Step 11: Select COM Port

  1. Go to: Tools → Port

  2. Select the COM port that appeared


PART 5 – Uploading First Program (Blink Test)


Step 12: Open Blink Example

  1. 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:

 
int ledPin = 13;

With:

 
int ledPin = 2;

Step 14: Upload Code

  1. Click Upload (→)

  2. Wait for compiling

  3. Wait for uploading


Step 15: If Upload Stuck / Failed

When uploading, if it says:

 
Connecting........_____.....

Then:

  1. Press and hold BOOT button on ESP32

  2. While holding BOOT → Click Upload

  3. 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

Exercise Files
pololu-cp2102-windows-220616.zip
Size: 3.53 MB
arduino IDE.zip
Size: 150.13 MB
Scroll to Top