Microcontroller simulator
A browser-based Arduino Uno and ESP32 simulator built around a real breadboard. Place parts hole by hole, wire them as you would on the bench, and program them in standard Arduino C++. The simulator traces every connection and solves the circuit itself (currents, voltage drops, LED forward voltage, transistor switching, capacitor charging), so a missing resistor, a button with no path to ground or a part wired backwards is caught before it would cost you a component. Debug with single-step execution, a variable watch, the serial monitor and a pin timeline; on the ESP32, the web server you write opens on a simulated phone over Wi-Fi. Eighteen guided projects check both the wiring and the code. Free, nothing to install, no account.
🔧 How to build this on a real breadboard
Rows are a–j and columns are numbered along the breadboard. The five holes in a column on the same half (a–e or f–j) are connected inside; the long + and − rails run along the edges.
Wi-Fi: not started
Components for this project
Every part in this build: what it does here, how it works, what it is made of (down to the elements and the rocks they are mined from), its chemistry, and the biology it mirrors. Tap a part to open it.
What makes this simulator different
- Real breadboard wiring. Parts plug into real holes, and you wire them yourself. The simulator follows the metal strips inside the breadboard to work out what is connected, so a wrong hole really does break the circuit, just like in real life.
- Wiring help in plain English. “The LED is backwards”, “No resistor: a real LED would burn out”, “Connect the brown servo wire to GND”, “Both legs are in the same row, so the LED is shorted out”.
- Step through your code. Run one line at a time or in slow motion, with the current line highlighted.
- See every pin over time. The pin timeline works like a logic analyser: blinks, PWM duty cycles, servo angles and buzzer tones.
- Missions that check your wiring and your code. The checker presses the buttons, turns the knob and moves objects for you, then explains what still needs fixing.
- A step-by-step build list. Open How to build this on a real breadboard to copy your circuit, hole by hole, onto a real one.
- Free, with no account, and it works on a phone (pinch to zoom). Share your project with a link.
Basic electronics: batteries, switches and a multimeter
You don’t need code to start. Add a 9 V battery, an AA battery, a 2 × AA or 4 × AA pack, a coin cell or a Li-ion 18650, wire its red (+) and black (−) leads to the breadboard, and the circuit runs straight away. A real circuit solver works out the voltage at every point and the current in every part, so a 220 Ω resistor and an LED on a 9 V battery take about 30 mA, a light bulb glows brighter on 6 V than on 3 V, a DC motor spins faster with more current (and backwards if you swap its leads), and a capacitor charges and discharges slowly through a resistor. A slide switch connects its middle leg to one side or the other: tap it to flip. A diode lets current through in one direction only. An NPN transistor (2N2222) lets a small current into its base switch a big current through its collector, which is how an Arduino pin safely controls a motor. Use the multimeter to measure: touch its probes across a part to read volts, or tap it to switch to mA and put it in the path of the current. If something would get hot or break in real life (a shorted battery, an LED with no resistor, a motor straight on a pin), the simulator warns you and explains why.
Laying out wires neatly
Click a pin or a hole to start a wire, click anywhere between holes to add a corner (the wire stays straight and lines up with the hole rows), and click right on a hole to finish. To tidy a wire later, tap it, then drag any straight section to slide it, drag a white dot to move a corner, double-click to add or remove a corner, or drag a blue end square to plug it into another hole.
ESP32: Wi-Fi and a phone dashboard
The ESP32 is a microcontroller with Wi-Fi and Bluetooth built in, used in smart-home gadgets and IoT projects. Its pins work at 3.3 V (not 5 V), its analog inputs read 0–4095 (12-bit), almost every pin can do PWM, and GPIO 34, 35, 36 and 39 are input-only. The blue LED on the board is on GPIO 2. In the simulator, WiFi.begin() joins a virtual network and the WebServer library works as on a real board: open your page on the virtual 📱 phone next to the code, tap its links and buttons, and the ESP32 answers in server.handleClient(). Use the ADC1 pins (GPIO 32–39) for analog sensors in Wi-Fi projects, because ADC2 stops working while Wi-Fi is on.
The MPU6050 accelerometer and the earthquake alarm
The MPU6050 (GY-521 board) measures acceleration on three axes and rotation, and talks to the microcontroller over I²C with just two signal wires: SDA (data) and SCL (clock), on GPIO 21 and 22 on the ESP32, or A4 and A5 on the Uno. When it is still it measures gravity, about 9.81 m/s² straight down. To detect shaking, measure the resting value of each axis first, then watch how far the readings move away from it: shake = √(dx² + dy² + dz²). Use the Shake slider for everyday vibration and 🌋 Earthquake! for a real quake, with a weak P-wave first and the strong S-wave about two seconds later. A good alarm ignores a passing truck but reacts to the quake, which is exactly the problem every earthquake early-warning sensor has to solve.
How a breadboard is connected
Inside a breadboard, the five holes in each short column (a–e, or f–j) are joined by a metal strip, so anything plugged into the same column half is connected. Hover over (or touch) a hole to see which holes it is connected to. The gap down the middle separates the two halves, which is why a push button or a chip straddles it. The long rows along the edges, marked + and −, are the power rails: wire the Arduino’s 5V to + and GND to −.
The Arduino Uno R3
Pins 0–13 are digital: each can be an OUTPUT (0 V or 5 V) or an INPUT. Pins marked ~ (3, 5, 6, 9, 10 and 11) can also do PWM: analogWrite(pin, 0–255) switches the pin on and off about 490 times a second, so the average voltage, and an LED’s brightness, can be set in 256 steps. Pins A0–A5 read voltages from 0 to 5 V with analogRead, giving a number from 0 to 1023 (about 4.9 mV per step). The POWER header has 5V, 3.3V, two GND pins and Vin; there is one more GND next to pin 13. Pin 13 also drives the small built-in LED marked L, and pins 0 and 1 (RX and TX) are used by the USB serial connection.
Why an LED needs a resistor
An LED drops about 2 V, so on a 5 V pin the remaining 3 V must be taken up by a resistor: R = (5 − 2) ÷ 0.015 A ≈ 200 Ω, so the standard 220 Ω is used. Try a 1 kΩ or 10 kΩ resistor in the simulator and watch the LED get dimmer, because less current flows (I = V ÷ R).
Buttons and INPUT_PULLUP
An input pin with nothing connected “floats” and reads random 0s and 1s. With pinMode(pin, INPUT_PULLUP), a resistor of about 20–50 kΩ inside the chip pulls the pin up to 5 V, so it reads HIGH. Wire the button between the pin and GND: pressing it connects the pin to 0 V, so it reads LOW.
Measuring distance with sound
The HC-SR04 sends a burst of ultrasound when Trig goes HIGH for 10 µs, then holds Echo HIGH until the echo returns. Sound travels about 343 m/s, or 0.034 cm per microsecond, and has to go there and back, so distance (cm) = time (µs) × 0.034 ÷ 2, about time ÷ 58.
Questions students ask
Is this the same as a real Arduino?
Your code is the same C++ you would upload with the Arduino IDE, the board has the real Uno pin layout, and the breadboard is connected like a real one. The simulator understands the common Arduino language (pinMode, digitalWrite, analogRead, delay, millis, Serial, Servo, tone, pulseIn, arrays and your own functions). Advanced C++ such as classes, pointers and most libraries is not supported.
How is this different from Tinkercad Circuits?
It adds step-by-step and slow-motion code execution with the current line highlighted, a live variable watch, a pin timeline like a logic analyser, missions that check both your wiring and your code automatically, plain-English wiring and code errors, and a hole-by-hole build list for a real breadboard. It opens instantly on a phone with no account.
Can I build a circuit with just a battery, no Arduino?
Yes. Add a battery from the parts bin (9 V, AA, 2 × AA, 4 × AA, coin cell or Li-ion), a resistor and an LED, a bulb or a motor, and wire them in a loop from + back to −. The circuit works immediately, with no code and without pressing Run. Add a slide switch to turn it on and off, and a multimeter to measure volts and milliamps.
How do I make my wires bend like in Tinkercad?
While drawing a wire, click between the holes to add corners and click right on a hole to finish. After a wire is placed, tap it and drag any straight part sideways, drag the white dots to move corners, or double-click to add or remove a corner.
Why is my LED not lighting up?
Check the list under the breadboard: it says what is wrong. Usually the short leg (−) is not connected to GND, the LED is backwards (the long leg must face the pin), or the resistor and the LED are not in the same row of holes.
Why does my button read random values?
The pin is floating. Wire the button between the pin and GND and use pinMode(pin, INPUT_PULLUP); a press then reads LOW and a release reads HIGH.
What practice projects are there?
Eighteen projects in three levels, each with a starter sketch, a hint, a solution and an automatic check of your wiring and code. Basic: Blink, SOS signal, Traffic light, Running lights, Button and LED, Knob dimmer, Night light. Intermediate: On/off with one button, Temperature alarm, Colour picker, Knob-controlled servo, Servo with 4 buttons, Parking sensor. Advanced: Automatic door, Pedestrian crossing, Phone-controlled LED and Wi-Fi thermometer (ESP32), and an earthquake alarm with the MPU6050.
Can I use an ESP32?
Yes. Choose ESP32 DevKit V1 in the Board menu (or open the ESP32 missions). Wi-Fi, the WebServer library, analogRead on the ADC pins, analogWrite and ledcWrite, the Servo library and the MPU6050 (Adafruit_MPU6050 or MPU6050_light) all work, and a virtual phone opens the web pages your ESP32 serves.
How do I add a part?
Drag it from the parts bin above the breadboard and drop it where you want it: its legs snap into the holes. Or tap a part to drop it in the next free space. Then wire it by clicking a pin and then a hole.
More engineering and electricity
Connected tools
The same idea from another angle, across the site.