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
| Part | Pin | Notes |
|---|---|---|
| Blue LED on the board | GPIO 2 (LED_BUILTIN) | DOIT ESP32 DevKit V1 |
| BOOT button / EN button | GPIO 0 / reset | BOOT has a 10 kΩ pull-up on the board |
| Red, amber, green LEDs | GPIO 16, 17, 18 | 330 Ω each |
| Buttons A and B | GPIO 13 and 27 | to GND: use INPUT_PULLUP |
| Touch pad | GPIO 4 (T0) | touchRead() drops when touched |
| Passive buzzer | GPIO 19 | tone() or ledcWriteTone() |
| Relay module and lamp | GPIO 23 | HIGH switches the lamp on |
| 10 kΩ knob | GPIO 34 (ADC1) | input-only pin |
| Light sensor (GL5528 LDR + 10 kΩ) | GPIO 35 (ADC1) | more light, higher reading |
| TMP36 temperature sensor | GPIO 36 (ADC1) | 0.5 V at 0 °C, +10 mV per °C |
| Wi-Fi router | OhmNet, password solder123 | gives 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.