Course Content
IoT Engineering Course using ESP32 Wifi Robots

📘 Software & Tools Setup

(Arduino IDE + ESP32 Setup – Step-by-Step Guide)


🎯 Lesson Objective

By the end of this lesson, students will:

  • Install Arduino IDE

  • Install ESP32 Board Package

  • Configure Arduino IDE for ESP32

  • Select correct board and COM port

  • Upload first test program

  • Verify everything is working properly

This lesson prepares the development environment for all future projects.


🖥️ PART 1 – Install Arduino IDE


🔹 Step 1 – Download Arduino IDE

  1. Open browser

  2. Go to:
    👉 https://www.arduino.cc/en/software

  3. Click Download Arduino IDE

Choose your operating system:

  • Windows

  • macOS

  • Linux

For most students → Windows 64-bit Installer


🔹 Step 2 – Install Arduino IDE

  1. Open downloaded file

  2. Click I Agree

  3. Keep default settings

  4. Click Install

  5. Wait until installation completes

  6. Click Finish

Now open Arduino IDE.


⚙️ PART 2 – Install ESP32 Board Package

By default, Arduino IDE does NOT support ESP32.

We must add ESP32 manually.


🔹 Step 3 – Open Preferences

In Arduino IDE:

Click:

👉 File → Preferences

A small window opens.


🔹 Step 4 – Add ESP32 Board URL

In the field:

Additional Boards Manager URLs

Paste this URL:

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

If something already exists there:

Separate with comma.

Example:

 
existing_link,https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
 

Click OK


🔹 Step 5 – Open Board Manager

Click:

👉 Tools → Board → Boards Manager

Search for:

 
ESP32
 

You will see:

esp32 by Espressif Systems

Click Install

Wait until installation completes.

This may take 2–5 minutes.


🔌 PART 3 – Connect ESP32 to Computer


🔹 Step 6 – Connect USB Cable

Connect ESP32 board using USB cable.

Important:

Use a data cable, not charging-only cable.

If cable is wrong:
Board will power ON but not detected by computer.


🔹 Step 7 – Install USB Driver (If Needed)

If board is not detected:

Check which USB chip your board uses:

Common chips:

  • CP2102

  • CH340

If COM port not appearing:

Install driver:

For CP2102:
👉 https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers

For CH340:
👉 https://sparks.gogo.co.nz/ch340.html

After installation, restart computer.


⚙️ PART 4 – Configure Arduino IDE for ESP32


🔹 Step 8 – Select Board

Click:

👉 Tools → Board → ESP32 Arduino

Select:

ESP32 Dev Module

This is safe default option.


🔹 Step 9 – Select COM Port

Click:

👉 Tools → Port

Select the COM port that appears when ESP32 is connected.

Example:

  • COM3

  • COM4

  • COM5

If no port appears:
Check USB driver.


🧪 PART 5 – Upload First Test Code

Now we test if everything works.


🔹 Step 10 – Write Simple Blink Code

Paste this code:

 
void setup() {
pinMode(2, OUTPUT); // Built-in LED (usually GPIO 2)
}

void loop() {
digitalWrite(2, HIGH);
delay(1000);
digitalWrite(2, LOW);
delay(1000);
}
 

🔹 Step 11 – Upload Code

Click:

👉 Upload (Arrow button)

If upload fails:

Hold BOOT button while clicking upload
Release when uploading starts.

Wait for:

“Done Uploading”


🔹 Step 12 – Verify LED Blink

If LED starts blinking:

✅ Setup successful
✅ ESP32 working
✅ IDE working
✅ Driver working

Congratulations 🎉


🖥️ PART 6 – Test Serial Monitor

Now test serial communication.

Replace code with:

 
void setup() {
Serial.begin(115200);
}

void loop() {
Serial.println("ESP32 Setup Successful!");
delay(1000);
}
 

Upload.


🔹 Step 13 – Open Serial Monitor

Click:

👉 Tools → Serial Monitor

Set baud rate to:

115200

You should see:

 
ESP32 Setup Successful!
 

If yes → everything is configured correctly.


⚠️ Common Problems & Solutions


❌ Error: “Failed to connect”

Solution:

  • Hold BOOT button while uploading

  • Check correct COM port

  • Check driver


❌ Error: No COM Port

Solution:

  • Install driver

  • Try different USB cable

  • Try different USB port


❌ Error: Compilation Failed

Solution:

  • Ensure ESP32 board installed

  • Select correct board


🧠 Why This Setup Is Important

Every project in this course depends on:

  • Correct board selection

  • Correct port

  • Correct baud rate

  • Proper driver installation

If setup is wrong → projects won’t work.


📌 Lesson Summary

In this lesson, we:

  • Installed Arduino IDE

  • Installed ESP32 board package

  • Installed USB driver

  • Selected correct board

  • Selected correct COM port

  • Uploaded test code

  • Verified serial monitor output

Your development environment is now ready.

Scroll to Top