Master ESP32 Programming from Zero
Build incredible IoT projects with the world's most popular microcontroller. From blinking LEDs to WiFi-connected dashboards â no prior experience needed.
ð Course Overview
This course takes you from absolute beginner to confident ESP32 developer. Each module builds upon the previous one, with hands-on examples, interactive simulators, and video tutorials.
What is ESP32?
Hardware, specs, architecture & pin explorer
Arduino IDE Setup
Install & configure your dev environment
Your First Program
Blink LED + interactive LED simulator
GPIO & Digital I/O
Buttons, LEDs, traffic light project
Analog & PWM
Sensors + PWM waveform visualizer
Serial Communication
Debug + interactive serial simulator
WiFi Basics
Station, Access Point, WiFi scanner
Web Server
Control hardware from any browser
Sensors & Displays
DHT22, OLED, I2C wiring
IoT Dashboard
Capstone: WiFi weather station
Interactive Circuit Lab
Drag & drop ESP32 breadboard simulator!
Final Quiz
20 questions to test your knowledge
ð§° What You'll Need
ESP32 Dev Board
Any ESP32 DevKit v1 or similar (~$5-10)
USB Cable
Micro-USB or USB-C data cable
Breadboard
Solderless breadboard + jumper wires
LEDs & Resistors
Assorted LEDs + 220ÎĐ resistors
DHT22 Sensor
Temperature & humidity sensor
OLED Display
0.96" I2C SSD1306 display
What is ESP32?
Understand the hardware, specifications, and capabilities of the most popular IoT microcontroller.
ð Overview
The ESP32 is a powerful, low-cost microcontroller made by Espressif Systems. It combines a dual-core processor, WiFi, Bluetooth, and dozens of I/O pins â all on a tiny chip that costs around $3-5.
Think of it as a small, affordable computer that can connect to the internet and interact with the physical world through sensors, motors, LEDs, and more.

⥠Key Specifications
| Feature | Specification |
|---|---|
| Processor | Dual-core Xtensa LX6, up to 240 MHz |
| RAM | 520 KB SRAM |
| Flash | 4 MB (external, varies by board) |
| WiFi | 802.11 b/g/n (2.4 GHz) |
| Bluetooth | Bluetooth 4.2 + BLE |
| GPIO Pins | 34 programmable pins |
| ADC | 18 channels, 12-bit resolution |
| DAC | 2 channels, 8-bit |
| Operating Voltage | 3.3V (5V input via USB) |

ð ESP32 vs Other Boards
| Feature | ESP32 | Arduino Uno | Raspberry Pi Pico |
|---|---|---|---|
| CPU | 240 MHz dual-core | 16 MHz single | 133 MHz dual |
| WiFi | â Built-in | â None | â (W variant: â ) |
| Bluetooth | â BT + BLE | â None | â |
| Price | ~$5 | ~$25 | ~$4 |
| GPIO Pins | 34 | 14 | 26 |
| Best For | IoT Projects | Learning basics | General programming |
ð Interactive Pin Explorer
Click any pin to learn about its capabilities:

ðĨ Video: Getting Started with ESP32
Arduino IDE Setup
Install and configure the Arduino IDE to program your ESP32 board.

ðĨ Step-by-Step Installation
Download Arduino IDE
Go to arduino.cc/en/software and download the latest version for your operating system (Windows, macOS, or Linux).
Install & Launch
Run the installer and open the Arduino IDE. You'll see a blank sketch with setup() and loop() functions.
Add ESP32 Board Manager URL
Go to File â Preferences. In "Additional Board Manager URLs", paste:https://espressif.github.io/arduino-esp32/package_esp32_index.json
Install ESP32 Board Package
Go to Tools â Board â Boards Manager. Search for "esp32" and install "esp32 by Espressif Systems".
Select Your Board
Go to Tools â Board â ESP32 Arduino and select "DOIT ESP32 DEVKIT V1" (or your specific board model).
Select COM Port
Connect your ESP32 via USB. Go to Tools â Port and select the COM port that appeared. If no port shows, install CP210x or CH340 USB drivers.
If your computer doesn't recognize the ESP32, you may need a data USB cable (not charge-only). Check the back of your board for the USB chip model (CP2102 or CH340) and install the correct driver.
ðĨ Video: Arduino IDE Installation
ðĨ Video: ESP32 Board Setup in Arduino IDE
Your First Program
Write, upload, and understand the classic "Blink" program â the Hello World of microcontrollers.

ðŧ The Blink Sketch
This program makes the built-in LED on GPIO 2 blink on and off every second.
ð Code Breakdown
LED_PIN with the number 2. GPIO 2 is where the built-in LED is connected on most ESP32 DevKit boards.HIGH sends 3.3V to the pin (LED ON). LOW sends 0V (LED OFF). This is digital output â only two states.millis() instead for non-blocking delays.ðĄ Interactive LED Simulator
LED State: OFF
ðĨ Video: ESP32 First Program
Modify the blink code to make the LED blink 3 times fast (200ms delay), then stay off for 2 seconds, and repeat. This simulates an SOS pattern!
GPIO & Digital I/O
Learn how to read buttons and control multiple LEDs using digital input/output pins.
ð Understanding GPIO
GPIO stands for General Purpose Input/Output. These are the pins on your ESP32 that you can configure to either:
- OUTPUT â Send voltage out (e.g., turn on an LED, activate a motor)
- INPUT â Read voltage in (e.g., detect a button press, read a sensor)
ESP32 GPIO pins operate at 3.3V, NOT 5V. Applying 5V to a GPIO pin can permanently damage the chip. Always use level shifters when interfacing with 5V devices.
ð Reading a Button
ðĶ Project: Traffic Light
ðĨ Video: ESP32 GPIO Tutorial
Analog & PWM
Read analog sensors and control LED brightness using Pulse Width Modulation.
ð Analog Input (ADC)
While digital pins only see HIGH or LOW, analog pins can read a range of values (0â4095 on ESP32's 12-bit ADC). This is essential for reading sensors like potentiometers, light sensors, and temperature sensors.
ð PWM Output
PWM (Pulse Width Modulation) simulates analog output by rapidly switching a digital pin on and off. The duty cycle determines how "bright" an LED appears or how "fast" a motor runs.
ð PWM Waveform Visualizer
ðĨ Video: ESP32 PWM Tutorial
Serial Communication
Debug your programs and communicate with your computer using the Serial Monitor.
ðĄ What is Serial Communication?
The Serial Monitor is your primary debugging tool. It creates a communication channel between your ESP32 and your computer over USB, allowing you to send and receive text messages.
ðĨïļ Interactive Serial Simulator
ðĨ Video: Arduino Serial Communication
WiFi Basics
Connect your ESP32 to the internet and unlock the power of IoT.

ðķ WiFi Station Mode
In Station Mode (STA), the ESP32 connects to your existing WiFi router â just like your phone or laptop does.
ðĄ Access Point Mode
In AP Mode, the ESP32 creates its own WiFi network. Devices can connect directly to it, no router needed!
ðĨ Video: ESP32 WiFi Tutorial
Web Server
Build a web interface to control your ESP32 from any browser on your network.
ð Complete Web Server Code
This creates a beautiful web page with buttons to toggle an LED, accessible from any device on your WiFi.
ðĨ Video: ESP32 Web Server
Sensors & Displays
Read environmental data with the DHT22 sensor and display it on an OLED screen.

ðĄïļ DHT22 Temperature & Humidity
Install via Arduino Library Manager: "DHT sensor library" by Adafruit and "Adafruit Unified Sensor".
ðš OLED Display (SSD1306)
Install: "Adafruit SSD1306" and "Adafruit GFX Library".
ðĨ Video: ESP32 with OLED Display
IoT Dashboard
Combine everything you've learned into a complete WiFi weather station with a web dashboard.
ðïļ Project Overview
This capstone project combines WiFi, Web Server, DHT22, and OLED into a complete IoT weather station. Your ESP32 will serve a beautiful live dashboard showing temperature, humidity, and historical data.
ðŧ Complete Weather Station Code
ðĨ Video: Complete IoT Project
ESP32 Circuit Laboratory
Build real circuits on a virtual breadboard â drag components, draw wires between pins, and simulate your circuit to see it come alive!
1. Drag components from the panel onto the breadboard.
2. Click "Wire Mode", then click on component pins (dots) to draw wires between them.
3. Choose wire colors to identify power (red), ground (blue), and signal (green) wires.
4. Click "Run" to simulate â the Serial Monitor will show real circuit behavior.
5. Hover a component to see its datasheet info in the bottom panel.
Component Info
Hover over a component to see its details
ð Guided Experiments
ðī Blink LED
Components: ESP32 + Red LED + 220ÎĐ Resistor
Wiring:
ðī GPIO2 â 220ÎĐ Resistor (red wire)
ðĒ Resistor â LED Anode (green wire)
ðĩ LED Cathode â GND (blue wire)
Result: LED blinks every second.
ðĶ Traffic Light
Components: ESP32 + 3 LEDs + 3 Resistors
Wiring:
ðī GPIO25 â R1 â Red LED â GND
ðĄ GPIO26 â R2 â Yellow LED â GND
ðĒ GPIO27 â R3 â Green LED â GND
Result: Sequential traffic light pattern.
ðĄïļ Weather Station
Components: ESP32 + DHT22 + OLED
Wiring:
ðī 3.3V â DHT22 VCC + OLED VCC
ðĩ GND â DHT22 GND + OLED GND
ðĒ GPIO4 â DHT22 Data
ðĄ GPIO21 (SDA) â OLED SDA
ðĄ GPIO22 (SCL) â OLED SCL
Result: Live temp/humidity on OLED.
ð Button + LED
Components: ESP32 + Button + LED + 2 Resistors
Wiring:
ðī 3.3V â Button â GPIO15
ðĒ GPIO15 â 10kÎĐ â GND (pull-down)
ðĩ GPIO2 â 220ÎĐ â LED â GND
Result: Press button to toggle LED.
ðïļ LED Dimmer (PWM)
Components: ESP32 + Pot + LED + Resistor
Wiring:
ðī 3.3V â Pot VCC
ðĩ GND â Pot GND
ðĄ Pot Wiper â GPIO34 (ADC)
ðĒ GPIO2 â 220ÎĐ â LED â GND
Result: Rotate pot to dim LED via PWM.
ð Smart Alarm
Components: ESP32 + LDR + Buzzer + OLED
Wiring:
ðī 3.3V â LDR â GPIO34
ðĒ GPIO34 â 10kÎĐ â GND (voltage divider)
ðĩ GPIO13 â Buzzer â GND
ðĄ GPIO21/22 â OLED (I2C)
Result: Dark â alarm sounds + OLED alert.
Final Quiz
Test your knowledge with 20 questions covering everything you've learned. Score 80% or higher to earn your certificate!
ð Your Certificate of Completion
Congratulations on completing the course! Download your official SGP certificate below.

This is to certify that
has successfully completed the ESP32 Programming Masterclass
A comprehensive course covering microcontroller programming, GPIO control, analog & PWM signals, serial communication, WiFi connectivity, sensor integration, and IoT project development