If you’ve just got your hands on an ESP32 development board and are wondering where to begin, you’re in the right place. The ESP32 is one of the most powerful and affordable Wi-Fi and Bluetooth microcontrollers on the market today. Whether you’re a student, hobbyist, or budding IoT developer, these 5 must-try ESP32 projects for beginners will help you master the basics while creating something genuinely useful.
In this 2025 updated guide, we’ll cover practical, real-world projects step-by-step, including wiring diagrams, code snippets, and tips so you can replicate them at home. Let’s dive in!
⚠️Disclaimer:
Working with electricity involves serious risk. Ensure you have the necessary skills and take proper safety precautions before attempting any electrical projects. Proceed at your own risk — the author assumes no responsibility for any damage, injury, or issues resulting from the use or misuse of the information provided.
All content on this website is original and protected by copyright. Please do not copy or reproduce content without permission. While most of the resources shared here are open-source and freely accessible for your learning and benefit, your respect for our intellectual effort is appreciated.
If you find our tutorials helpful, consider supporting us by purchasing related materials or sharing our work — it helps keep the content flowing.
Need help or have questions? Leave a comment below — the author is always happy to assist!
Table of Contents
Why the ESP32?
Before we get into the projects, let’s quickly recap why the ESP32 is so popular:
✅ Dual-core 32-bit processor (Xtensa LX6)
✅ Built-in Wi-Fi & Bluetooth
✅ Tons of GPIO pins, ADCs, DACs, PWM
✅ Supports I2C, SPI, UART
✅ Huge community & libraries
✅ Cheap — many boards under $10!
What You’ll Need
For these beginner-friendly ESP32 projects, you’ll need:
- ESP32 dev board (e.g., ESP32-WROOM-32 or NodeMCU-ESP32)
- Breadboard & jumper wires
- LEDs, resistors, push buttons
- Sensors (DHT11/DHT22 for temperature/humidity, HC-SR04 for distance)
- Micro USB cable
- Arduino IDE installed and configured for ESP32
- Optional: OLED display (SSD1306 128×64)
Project 1: ESP32 Wi-Fi Weather Monitor
Difficulty: ⭐⭐☆☆☆ (Easy)
Time: 1–2 hours
What You’ll Build
A simple Wi-Fi-enabled weather monitor that reads temperature and humidity from a DHT11/DHT22 sensor and displays the data on a web page hosted by your ESP32.
Components
- ESP32 dev board
- DHT11 or DHT22 sensor
- Jumper wires
- Breadboard
Circuit Diagram
Connect:
- DHT VCC → 3.3V
- DHT GND → GND
- DHT DATA → GPIO 4 (or any digital pin)
Step 1: Install DHT Library
In Arduino IDE, go to:
Sketch > Include Library > Manage Libraries.
Search for “DHT sensor library” by Adafruit and install it.
Step 2: Example Code
<code>#include <WiFi.h> #include "DHT.h" // Replace with your Wi-Fi credentials const char* ssid = "YOUR_SSID"; const char* password = "YOUR_PASSWORD"; #define DHTPIN 4 // DHT data pin #define DHTTYPE DHT22 // or DHT11 DHT dht(DHTPIN, DHTTYPE); WiFiServer server(80); void setup() { Serial.begin(115200); dht.begin(); WiFi.begin(ssid, password); Serial.print("Connecting to Wi-Fi"); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("."); } Serial.println("\nWi-Fi connected. IP address: "); Serial.println(WiFi.localIP()); server.begin(); } void loop() { WiFiClient client = server.available(); if (client) { Serial.println("New Client."); String currentLine = ""; while (client.connected()) { if (client.available()) { char c = client.read(); Serial.write(c); if (c == '\n') { if (currentLine.length() == 0) { float t = dht.readTemperature(); float h = dht.readHumidity(); client.println("HTTP/1.1 200 OK"); client.println("Content-type:text/html"); client.println(); client.print("<h1>ESP32 Weather Monitor</h1>"); client.print("<p>Temperature: "); client.print(t); client.print(" *C</p>"); client.print("<p>Humidity: "); client.print(h); client.print(" %</p>"); client.println(); break; } else { currentLine = ""; } } else if (c != '\r') { currentLine += c; } } } client.stop(); Serial.println("Client Disconnected."); } } </code>
How It Works
- Connects to your Wi-Fi.
- Sets up a basic web server on port 80.
- Reads temperature & humidity.
- Displays the data in your browser when you visit the ESP32’s IP.
Run It
- Upload the code.
- Open Serial Monitor.
- Find your ESP32’s IP.
- Open it in your browser — see live weather data!
Project 2: ESP32 Bluetooth Home Automation Switch
Difficulty: ⭐⭐☆☆☆ (Easy)
Time: 1–2 hours
What You’ll Build
Control an LED using Bluetooth from your smartphone — a simple intro to ESP32’s Bluetooth Classic SPP.
Components
- ESP32 board
- LED
- 220Ω resistor
- Smartphone with a Bluetooth terminal app
Circuit Diagram
- LED anode → GPIO 2 → 220Ω → GND
Example Code
<code>#include "BluetoothSerial.h" BluetoothSerial SerialBT; const int ledPin = 2; void setup() { Serial.begin(115200); SerialBT.begin("ESP32_BT_Switch"); pinMode(ledPin, OUTPUT); Serial.println("Bluetooth Started! Pair and send 'ON' or 'OFF'"); } void loop() { if (SerialBT.available()) { String command = SerialBT.readStringUntil('\n'); command.trim(); Serial.println("Received: " + command); if (command == "ON") { digitalWrite(ledPin, HIGH); } else if (command == "OFF") { digitalWrite(ledPin, LOW); } } } </code>
Run It
- Upload.
- Pair your phone with ESP32_BT_Switch.
- Open any Bluetooth terminal app.
- Send “ON” or “OFF” — see the LED toggle!
Project 3: ESP32 Ultrasonic Distance Sensor with OLED Display
Difficulty: ⭐⭐⭐☆☆ (Medium)
Time: 2–3 hours
What You’ll Build
Measure distance using an HC-SR04 ultrasonic sensor and show it live on a 0.96” SSD1306 OLED.
Components
- ESP32
- HC-SR04 sensor
- SSD1306 OLED 128×64
- Jumper wires
- Breadboard
Circuit Diagram
HC-SR04:
- VCC → 5V (or 3.3V if safe)
- GND → GND
- Trig → GPIO 5
- Echo → GPIO 18
OLED:
- VCC → 3.3V
- GND → GND
- SDA → GPIO 21
- SCL → GPIO 22
Example Code
<code>#include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #define TRIG_PIN 5 #define ECHO_PIN 18 Adafruit_SSD1306 display(128, 64, &Wire, -1); void setup() { Serial.begin(115200); pinMode(TRIG_PIN, OUTPUT); pinMode(ECHO_PIN, INPUT); if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) { Serial.println("SSD1306 allocation failed"); for (;;); } display.clearDisplay(); } void loop() { long duration; float distanceCm; digitalWrite(TRIG_PIN, LOW); delayMicroseconds(2); digitalWrite(TRIG_PIN, HIGH); delayMicroseconds(10); digitalWrite(TRIG_PIN, LOW); duration = pulseIn(ECHO_PIN, HIGH); distanceCm = duration * 0.034 / 2; display.clearDisplay(); display.setTextSize(2); display.setTextColor(WHITE); display.setCursor(0, 10); display.print("Distance:"); display.setCursor(0, 35); display.print(distanceCm); display.print(" cm"); display.display(); delay(500); } </code>
Project 4: ESP32 Motion Detector with Email Alert
Difficulty: ⭐⭐⭐⭐☆ (Intermediate)
Time: 2–4 hours
What You’ll Build
Detect motion using a PIR sensor and send an email alert using SMTP.
Components
- ESP32
- PIR sensor (HC-SR501)
- Jumper wires
Circuit
PIR VCC → 5V
PIR GND → GND
PIR OUT → GPIO 27
Example Code
You’ll need:
- SMTP2GO, Mailgun, or a Gmail account with App Password
<code>#include <WiFi.h> #include "ESP32_MailClient.h" const char* ssid = "YOUR_SSID"; const char* password = "YOUR_PASSWORD"; #define PIR_PIN 27 #define SMTP_HOST "smtp.gmail.com" #define SMTP_PORT 465 #define AUTHOR_EMAIL "[email protected]" #define AUTHOR_PASSWORD "YOUR_APP_PASSWORD" #define RECIPIENT_EMAIL "[email protected]" SMTPSession smtp; void setup() { Serial.begin(115200); pinMode(PIR_PIN, INPUT); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); } } void loop() { if (digitalRead(PIR_PIN) == HIGH) { sendEmail(); delay(10000); // Wait to prevent spamming } } void sendEmail() { SMTP_Message message; message.sender.name = "ESP32 Motion Sensor"; message.sender.email = AUTHOR_EMAIL; message.subject = "Motion Detected!"; message.addRecipient("Admin", RECIPIENT_EMAIL); message.text.content = "Motion has been detected!"; smtp.debug(1); smtp.callback([](SMTP_Status status) { Serial.println(status.info()); }); if (!smtp.connect(SMTP_HOST, SMTP_PORT)) return; if (!MailClient.sendMail(&smtp, &message)) { Serial.println("Error sending Email"); } smtp.closeSession(); } </code>
Project 5: ESP32 IoT Data Logger to ThingSpeak
Difficulty: ⭐⭐⭐⭐☆ (Intermediate)
Time: 3–5 hours
What You’ll Build
Measure temperature and humidity and send the data to ThingSpeak every minute — so you can monitor your sensor from anywhere!
Components
- ESP32
- DHT11/DHT22
- Wi-Fi
Example Code
<code>#include <WiFi.h> #include "DHT.h" #include "HTTPClient.h" const char* ssid = "YOUR_SSID"; const char* password = "YOUR_PASSWORD"; #define DHTPIN 4 #define DHTTYPE DHT22 String serverName = "http://api.thingspeak.com/update?api_key=YOUR_API_KEY"; DHT dht(DHTPIN, DHTTYPE); void setup() { Serial.begin(115200); WiFi.begin(ssid, password); while (WiFi.status() != WL_CONNECTED) { delay(500); } dht.begin(); } void loop() { if (WiFi.status() == WL_CONNECTED) { HTTPClient http; float t = dht.readTemperature(); float h = dht.readHumidity(); String serverPath = serverName + "&field1=" + String(t) + "&field2=" + String(h); http.begin(serverPath); int httpResponseCode = http.GET(); Serial.print("HTTP Response code: "); Serial.println(httpResponseCode); http.end(); } delay(60000); // Send every 60s } </code>
Final Tips for Beginners
✅ Always double-check your pin connections.
✅ Use Serial Monitor for debugging.
✅ Start with small sketches, then expand.
✅ Never use 5V signals directly on ESP32’s 3.3V pins without level shifting.
Read more:
- Top Smart Lighting Solutions for Productivity and Ambiance
- Best Budget-Friendly Noise-Canceling Headphones for Remote Work
- Best Ergonomic Office Chairs Under $200 (AliExpress Picks for 2025)
Conclusion
These 5 beginner ESP32 projects are more than enough to help you master Wi-Fi, Bluetooth, sensors, and IoT cloud integration. Each project is modular, so once you complete it, you can combine ideas to build advanced home automation or IoT products.
Liked this article? Subscribe to our newsletter:
or,
Visit LabProjectsBD.com for more inspiring projects and tutorials.
Thank you!
0 Comments