Source: https://mokxi.com/learn/esp32-projects-for-beginners
Updated: 2026-10-21

Learn

# ESP32 projects for beginners, in the order to try them

Beginner

Written by the Mokxi team, updated October 21, 2026

Start building free Open the editor

Or see every lesson.

- 424 parts on the bench
- 35 boards running now
- 1.00x real time, on every board

Click to open it in the editor

The ESP32 knob example: a potentiometer on GPIO 32 sets the brightness of an LED on GPIO 4, with the raw reading printed.

The ESP32 is a good first board: it costs about the same as an Arduino clone, has WiFi, and runs the same Arduino code. This page lists beginner projects in the order that teaches the most, and every one is already built and running in Mokxi, so you can try it in your browser before you buy a single part.

The circuit above is project three, a potentiometer that dims an LED on a classic ESP32 DevKit. Press Run and turn the knob: the serial monitor prints the raw reading and the PWM duty. At the middle it reads 1892, not 2048, and it reaches 4095 a little before the knob is all the way up. Why that is, is the most useful thing a beginner can learn about the ESP32’s ADC, and it is explained below.

## Before you start: three ESP32 differences

It runs at 3.3 V. A GPIO pin outputs 3.3 V and must never see 5 V. Sensors made for an Uno often work at 3.3 V, but check, and put a divider or a level shifter on any 5 V signal coming in.

Its ADC reads 0 to 4095, twelve bits, not 0 to 1023. At the default attenuation the reading is not a straight line: it saturates at about 3.1 V, so a knob across 3.3 V hits 4095 early and reads about 1890 in the middle. That is exactly what the circuit above prints.

Pin numbers are GPIO numbers, and some pins are special. On the classic ESP32, GPIO 34 to 39 are inputs only, and some pins decide how the chip boots. Each board page in Mokxi lists its pins.

## Projects 1 to 4: pins, PWM and the ADC

1. Blink an LED. The first sketch on any board: pinMode, digitalWrite and delay. On an ESP32-C3 the LED is on GPIO 8.

2. A button and an LED. A pushbutton from a pin to ground with INPUT_PULLUP, lighting the LED while it is held. It teaches pull-up resistors without a resistor.

3. A knob that dims an LED. The circuit above: analogRead on GPIO 32 and analogWrite on GPIO 4. It teaches the 12-bit ADC and PWM.

4. A servo sweep. An SG90 on a 50 Hz PWM channel, swept end to end. The pulse width is the angle, and the ESP32’s LEDC hardware keeps the pulses going while the core does other work.

## Projects 5 to 7: sensors and displays

5. A NeoPixel rainbow. Sixteen WS2812B LEDs on one data pin of an ESP32-C3, with a hue wheel running along them. On a real board the Adafruit NeoPixel library does the timing for you.

6. A temperature and humidity monitor. A DHT22 on one pin, read every couple of seconds and printed to the serial monitor. Add an SSD1306 OLED on I2C to show it without a computer.

7. A room sensor. A DHT22, a BH1750 light sensor and a PIR motion sensor on one ESP32-C3, the build many Home Assistant users start with. Each reading is printed as the MQTT message it would send.

## Projects 8 to 10: WiFi

8. Connect to WiFi. WiFi.begin(), wait for the connection, print the IP address. In Mokxi the network is simulated inside the browser and nothing leaves your computer. Change the password on purpose and the connection fails after five seconds, as it does on a real board.

9. A web page that switches a lamp. A WebServer on the ESP32 serves a page with two buttons; press one in the Web panel and the LED follows. This is the project that makes the ESP32 click for most people.

10. Fetch data with HTTP. HTTPClient asks a server for JSON, and the sketch parses the numbers. In Mokxi it talks to a mock server whose answers you can edit, and a request to the real internet is refused with a plain message.

## Which ESP32 board to buy

For a first board, an ESP32 DevKit V1 (the classic ESP32) or an ESP32-C3 SuperMini. The DevKit has the most pins and the most tutorials. The SuperMini is tiny and cheap and has native USB. The ESP32-S3 is the pick for cameras, displays and more memory. All three, and several more, run in Mokxi, so you can try your project on each before you choose.

If you already have an Arduino Uno, start the first two projects there; they need no change but the pin numbers. The page comparing the Uno, the ESP32 and the Pico goes deeper.

## Common beginner mistakes

Wiring 5 V into a GPIO. The ESP32 is a 3.3 V chip, and 5 V on a pin can damage it.

Expecting analogRead to be a straight line from 0 to 3.3 V. At the default attenuation it reads about 1890 in the middle of a knob and 4095 from about 3.1 V, as the circuit above shows; use analogReadMilliVolts() for volts.

Using ADC2 pins with WiFi on. On the classic ESP32, the ADC2 pins cannot be read while WiFi is running. Use ADC1 pins such as GPIO 32 to 39 for anything analog in a WiFi project.

Picking a pin that affects booting. If the board will not start with your circuit attached, move the part off the strapping pins listed on its board page.

## Questions

What is a good first ESP32 project?

Blink an LED, then a button, then a knob that dims an LED. Those three teach digital output, input with a pull-up, the 12-bit ADC and PWM. After that, a web page that switches a lamp shows what the WiFi is for.

Can I try ESP32 projects without the board?

Yes. Every project on this page runs in Mokxi in your browser, with the Arduino code compiled and running on a simulated ESP32. No account is needed to open and run them.

Do ESP32 projects use the Arduino IDE?

Most beginner tutorials do, with the ESP32 board package installed. The code on this page is Arduino code and uploads from the Arduino IDE unchanged.

Why does my ESP32 analogRead hit 4095 before 3.3 V?

At the default 11 dB attenuation a real ESP32’s raw reading saturates at about 3.1 V and bends on the way there, so the middle of a 3.3 V knob reads about 1890 rather than 2048. Use analogReadMilliVolts() for a reading in millivolts.

Related

## Keep going

Blink an LED on the ESP32-C3, Step by Step ESP32 analogRead: 12 Bits, Attenuation and ADC2 ESP32 Servo Motor: Wiring and LEDC Code ESP32 NeoPixel (WS2812B) Rainbow Tutorial Connect a Board to WiFi and Serve a Page ESP32 IoT Projects for Final Year Students Best ESP32 Simulator? The Free Options, Compared The ESP32 simulator The ESP32 DevKit V1 The ESP32-C3 SuperMini The project page, with the full sketch Beginner

## Build this for real

Open the editor, change a value and watch the number move with it. Nothing to install, and no account needed.

Start building free Open the editor
