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!

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!

Why the ESP32?

5 Must-Try ESP32 Projects

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:

Advertisements
  • 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

5 Must-Try ESP32 Projects

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 &lt;WiFi.h&gt;
#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("&lt;h1&gt;ESP32 Weather Monitor&lt;/h1&gt;");
            client.print("&lt;p&gt;Temperature: ");
            client.print(t);
            client.print(" *C&lt;/p&gt;");
            client.print("&lt;p&gt;Humidity: ");
            client.print(h);
            client.print(" %&lt;/p&gt;");
            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

  1. Upload the code.
  2. Open Serial Monitor.
  3. Find your ESP32’s IP.
  4. Open it in your browser — see live weather data!

Project 2: ESP32 Bluetooth Home Automation Switch

5 Must-Try ESP32 Projects

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

  1. Upload.
  2. Pair your phone with ESP32_BT_Switch.
  3. Open any Bluetooth terminal app.
  4. Send “ON” or “OFF” — see the LED toggle!

Project 3: ESP32 Ultrasonic Distance Sensor with OLED Display

5 Must-Try ESP32 Projects

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 &lt;Wire.h&gt;
#include &lt;Adafruit_GFX.h&gt;
#include &lt;Adafruit_SSD1306.h&gt;

#define TRIG_PIN 5
#define ECHO_PIN 18

Adafruit_SSD1306 display(128, 64, &amp;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

5 Must-Try ESP32 Projects

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 &lt;WiFi.h&gt;
#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(&amp;smtp, &amp;message)) {
    Serial.println("Error sending Email");
  }
  smtp.closeSession();
}
</code>

Project 5: ESP32 IoT Data Logger to ThingSpeak

5 Must-Try ESP32 Projects

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 &lt;WiFi.h&gt;
#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 + "&amp;field1=" + String(t) + "&amp;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:


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:

Loading

or,

Visit LabProjectsBD.com for more inspiring projects and tutorials.

Thank you!


MKDas

Mithun K. Das. B.Sc. in Electrical and Electronic Engineering (EEE) from KUET. Senior Embedded Systems Designer at a leading international company. Welcome to my personal blog! I share articles on various electronics topics, breaking them down into simple and easy-to-understand explanations, especially for beginners. My goal is to make learning electronics accessible and enjoyable for everyone. If you have any questions or need further assistance, feel free to reach out through the Contact Us page. Thank you for visiting, and happy learning!

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *