worldngayon students

Microcontroller simulator

Build the circuit on the breadboard, write the code, and press ▶ Run. Drag from any Arduino pin or breadboard hole to another to add a wire, just like on a real breadboard. The simulator works out what is really connected and tells you in plain English if something is missing: an LED with no resistor, a button with no ground, a sensor with no power. Stuck on the code? Use Step to run one line at a time.

Wire
Drag from a pin or hole to add a wire · drag a part to move it · tap a wire or part, then ⟳ Rotate or 🗑 Delete · pinch or Ctrl + scroll to zoom
Serial Monitor 9600 baud
Variables live values
Pin timeline like a logic analyser: every pin over time
Your circuit and code are saved in this browser automatically. Tip: Ctrl + Enter runs the code.

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.

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.

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.

Can I use an ESP32?

Not yet. An ESP32 board with a Wi-Fi phone dashboard and an accelerometer earthquake-alarm mission is coming next, which is why this is called the microcontroller simulator.

More engineering and electricity

Know someone who needs this?

It's free for every student. Send it to your class group chat.

Updated · Free, no sign-up ·

Connected tools

The same idea from another angle, across the site.