ESP32 simulator

About

Free demo: level 1 (5 challenges: LEDs, buttons, serial and the ADC). Levels 2 to 5 (PWM, touch and sound, Wi-Fi, web servers for your phone, deep sleep and battery power) and Free play are in the full version.

About this simulator

Program a real-feeling ESP32 in Arduino C++: blink and fade LEDs, read sensors, join Wi-Fi, serve web pages to a phone, and make it last for weeks on a battery with deep sleep.

How it works

  • Read the goal. Each challenge says exactly what the checker tests, and the Learn box shows the new code you need, with an example.
  • Write the code and press ▶ Upload and run. The board starts just like a real one: the serial monitor shows the ESP32's start-up messages, then whatever your sketch prints. Press the buttons (or the A and B keys), touch the pad, turn the knob, switch the router off, walk the board away from it, and open the board's web pages on the phone.
  • Check it. ✓ Check my code runs your program on a fresh board for some simulated seconds, working the buttons, sensors, router and phone like a person would, and tells you what passed and what didn't.
  • Earn stars. One star for working, one for doing it without hints or the answer, and one for the bonus goal.
  • Your code is saved in this browser for each challenge, and so is the board's Preferences storage, just as a real ESP32 keeps it through a re-upload.

The kit

PartPinNotes
Blue LED on the boardGPIO 2 (LED_BUILTIN)DOIT ESP32 DevKit V1
BOOT button / EN buttonGPIO 0 / resetBOOT has a 10 kΩ pull-up on the board
Red, amber, green LEDsGPIO 16, 17, 18330 Ω each
Buttons A and BGPIO 13 and 27to GND: use INPUT_PULLUP
Touch padGPIO 4 (T0)touchRead() drops when touched
Passive buzzerGPIO 19tone() or ledcWriteTone()
Relay module and lampGPIO 23HIGH switches the lamp on
10 kΩ knobGPIO 34 (ADC1)input-only pin
Light sensor (GL5528 LDR + 10 kΩ)GPIO 35 (ADC1)more light, higher reading
TMP36 temperature sensorGPIO 36 (ADC1)0.5 V at 0 °C, +10 mV per °C
Wi-Fi routerOhmNet, password solder123gives the board 192.168.1.57

How accurate is it?

The simulator follows version 3 of the ESP32 Arduino core, the one in today's Arduino IDE: the same function names (so the old ledcSetup() tutorials fail to compile, just as they do for real), 32-bit int, double maths, Serial.printf, the WiFi, WebServer and Preferences libraries, deep sleep with RTC memory, and the chip's real limits: input-only GPIOs 34 to 39 with no pull-ups, ADC2 pins that stop working while Wi-Fi is on, flash pins 6 to 11 that crash the board, a PWM frequency × resolution limit of 80 MHz, and Wi-Fi passwords of at least 8 characters.

The ADC behaves like a real ESP32's: 12-bit, flat near 0 V, bending near the top, with a little noise, while analogReadMilliVolts() applies calibration. Buttons bounce. Wi-Fi takes a second or two to join, the signal falls off with distance, the board notices a lost router after about 6 seconds and reconnects by itself. The power meter uses figures from the ESP32 datasheet: around 50 mA awake, about 100 mA with the radio listening, and 10 µA in deep sleep.

What it doesn't do: the phone shows plain HTML pages but doesn't run JavaScript, there's no HTTPS, MQTT or Bluetooth, and timing is accurate to a few microseconds rather than to the clock cycle. A crash stops the simulation with the ESP32's own "Guru Meditation" message instead of rebooting over and over.