ESP32 projects for beginners
Step-by-step ESP32 projects: wiring diagram, code and explanation.
Blinking LED
The first program on every microcontroller: turn an LED on and off every second. You learn what a digital output is, why you need a resistor and what the endless loop() looks like.
Button turns on LED
The first digital input. Press a button → the LED lights. You learn what a pull-up resistor is and why the pin reads "1" when nothing is pressed.
Dimmer with a potentiometer
Turn a knob → the LED gradually gets brighter. Two new concepts: analog input (ADC, 0–4095) and analog output via PWM (0–255).
🔒Traffic light
Three LEDs taking turns: red → red+yellow → green → yellow. Multiple outputs, a timed sequence and your first own function.
🔒Temperature and humidity
Your first real sensor. The DHT22 sends temperature and humidity over one wire; you print them in the Serial Monitor. You learn to install and use a library.
🔒Parking sensor
The HC-SR04 measures distance and the buzzer beeps faster the closer you are — like a car parking sensor. You learn about 5 V modules, voltage dividers and measuring time with pulseIn().
🔒Servo with a potentiometer
Turn the potentiometer → the servo follows the angle 0–180°. Your first motor, your first device that draws more current, and the ESP32Servo library.
🔒Weather station on an OLED
Show the temperature and humidity from the DHT22 on an OLED display — no computer needed. You learn I2C communication and drawing text and graphics.
🔒Motion detector + relay
A PIR sensor detects motion and the ESP32 switches a relay (lamp, fan) on for 10 seconds. You learn about 5 V modules with 3.3 V outputs, relays and safely controlling bigger loads.
🔒Control over WiFi
The ESP32 connects to your WiFi and serves a small web page. From your phone you switch two LEDs on and off. This is where the ESP32 outgrows the Arduino.