Fareed Mohmed← Engineering

Engineering · Learn & build · Arduino · version 3.20

Arduino Simulator

Drag a sensor, drag a light, tell it what to do, and watch it work before you buy a single wire.

Choose a real board (Uno, Nano or Mega), drag in lifelike sensors and power hardware, and see every single wire. Build the sequence with simple steps, and the page writes the sketch, runs the simulation, lists the parts to buy and exports everything as a PDF. Made for school students: every part comes with do’s, don’ts, cautions and tips.

Browse the Arduino Project Library → Ready-made projects with the circuit already built and running.

0Arduino in 60 seconds

setup() and loop()

setup() runs once when power comes on. loop() then repeats forever. Your steps below are the loop.

Digital pins

Each pin is a switch that is either HIGH (5 V) or LOW (0 V). Set it as OUTPUT to drive an LED, or INPUT to read a button.

Analog inputs A0 to A5

They read a voltage as a number from 0 to 1023. Potentiometers, light sensors and the LM35 temperature sensor use them.

PWM pins (~)

Pins 3, 5, 6, 9, 10 and 11 switch on and off very fast to fake an in-between voltage. That is how a motor gets 0 to 100% speed.

Pull-up for buttons

A button joins the pin to GND. With the internal pull-up switched on, the pin reads HIGH when released and LOW when pressed.

Common ground

Every part must share GND with the Arduino. A missing ground is the most common reason a new circuit does nothing.

1Choose your Arduino board
2Build the circuit
Parts: sensors and actuators (tap to show or hide)

Try the inputs (virtual sensors)

Pins (you can change them)

PartArduino pin (change it here)How to wire it

Every wire, one by one

Red rail = 5 V from the Arduino 5V pin. Black rail = GND. The coloured wires carry signals. Match the wire colours on the drawing to this list.

#ColourFrom (part and leg)To
3Define the sequence

Steps run from top to bottom, then start again. While the simulation runs, the active step is highlighted in green.

4Arduino code

5Parts list and where to buy

Quantities come from the parts you added. The store links open a search for that item on Robu.in, Amazon.in and ThinkRobotics, so you always see what is in stock today. Check the model, voltage and price before you order.

#ItemQtySearch termBuy / compare
6Export

The PDF has the circuit sketch, pin table, every wire, sequence, full code, the parts list with store links, do’s and don’ts for each part, and the safety notes. The project file lets you come back and keep editing.

7Learn: do’s, don’ts, cautions and tips
?How it works
How to use it
  1. Pick your board (Uno, Nano or Mega) first. Switching later keeps your parts and moves pins where needed.
  2. Tap or drag parts from the list onto the circuit. Each one is wired to a suitable pin of your chosen board, and its wires appear in the drawing and in the wire list.
  3. Change a pin in the table if you want a different one. Only pins that suit the part and are free are offered.
  4. Add steps: set an output, wait, wait until a sensor condition, if/else, or map a knob onto a servo or motor.
  5. Press Run. Move the virtual sensors and watch the outputs respond.
  6. Copy the code into the Arduino IDE, buy the parts from the list, and export the PDF.
What each step does
  • Set output: LED, buzzer or relay ON/OFF; servo angle 0 to 180; motor speed 0 to 100%.
  • Wait: pause for some milliseconds (1000 ms = 1 second).
  • Wait until: stop here until a sensor condition is true (for example, motion detected).
  • If / else: check a condition each time round the loop and set an output either way.
  • Map: turn a sensor range into an output range, like a potentiometer 0 to 100% into servo 0 to 180 degrees.
What the simulator does and does not check

It runs the same logic and timing as the generated code. It does not check electrical correctness fully, such as a missing resistor, the wrong supply voltage or a short circuit, and real sensors are noisier than the sliders. Treat it as a way to get the logic right, then test on the real board.

What is new
  • 3.20 (24 Oct 2026): a panel you move now stays inside the drawing and keeps its own scroll bar, so long lists (pins, wires, code, parts) can always be scrolled to the end.
  • 3.19 (24 Oct 2026): in full screen the tabs and the panels are movable: drag the "move" handle to place the tabs anywhere on the drawing, and drag a panel by its title bar. The drawing now also fills the whole screen height, with no empty space under the buttons (this was missing on the Project Library pages).
  • 3.18 (24 Oct 2026): in full screen, Pins, Wires, Sequence, Code and BOM are tabs on the left edge of the circuit. Tap one and its panel opens inside the drawing, next to the tabs, so you can read it and still see your circuit. Tap the tab again, or the cross, to close it.
  • 3.9 (23 Oct 2026): "In the real world" panels. Under the simulator, a live street, gate or room mirrors your circuit: the traffic lights, street lamps, railway gate, car-park barrier and fire alarm you build run as the real thing. Also fixed: the distance sensor in gate and barrier projects is no longer taken over by the radar arena.
  • 3.7 (23 Oct 2026): several cloud switches in one program now read their own ThingSpeak field (Cloud 1 = field 2, Cloud 2 = field 3, and so on). New projects: Wi-Fi 4-load control, IoT cloud dashboard, cloud and manual control, and 17 more robots, gates, memory counters and lights since 3.5.
  • 3.6 (23 Oct 2026): permanent memory. The variable step can now save a number to the EEPROM and load it back, so counters and switches remember their value after a power cut (the Reset control of the simulator keeps it). Eight new projects: memory counters, a remembering lamp, a door opening counter, a Simon memory game, LED Pong, a two-lap stopwatch and an SOS beacon.
  • 3.5 (23 Oct 2026): timing and order. The variable step now has a stopwatch (start it, read the milliseconds, divide a number by it), an "only if" condition, and counting down never goes below 0. The new "Wait until either" step waits for the first of two sensors. These make speed traps, stopwatches and two-way visitor counters possible.
  • 3.4 (23 Oct 2026): new step "Compare two sensors" (if the left light sensor is brighter than the right one by a margin, then turn the servo). It makes solar trackers and light-following robots possible.
  • 3.2 (23 Oct 2026): displays, ID and sound. New parts: 8x8 LED matrix (MAX7219) with heart, smiley, arrows and letters; 8 LEDs on a 74HC595 shift register; a 16-LED chaser and level bar on two chained 74HC595 chips; OLED and TFT readouts; RFID reader RC522; fingerprint sensor R307; DFPlayer MP3 player; and an SD card data logger. SPI parts reuse the wiring from 3.1.
  • 3.1 (23 Oct 2026): links and radio. New parts: Wi-Fi (ESP-01 to a ThingSpeak cloud graph), Cloud switch (web button), GSM SIM800L (SMS and call), 433 MHz radio, nRF24L01 radio, LoRa, and a GPS module with latitude, longitude, speed and distance from home. A new Link monitor under the circuit shows every SMS, radio message and cloud upload, a cloud graph and a GPS map. The wiring now handles 3.3 V and SPI pins (the simulator reserves the right ones).
  • 3.0 (23 Oct 2026): robots. New parts: Robot car (two motors + L298N, with spin, turn, forward and back commands) and a pair of IR line sensors. A new Robot arena (top view) under the circuit shows the car driving on a black line track or in a room with boxes, and the sensors read the real floor and distances. A radar mode shows an ultrasonic sensor on a servo sweeping and finding objects. Press Reset car to start again.
  • 2.9 (23 Oct 2026): 18 new measuring parts: pH, TDS, turbidity, current (ACS712), load cell + HX711, pressure (BMP180), lux (BH1750), colour (TCS3200), IR thermometer (MLX90614), thermocouple (MAX6675), NTC thermistor, force (FSR), pulse, voltmeter, ohm meter, vibration, and a real-time clock (DS3231 or DS1307) with hour and minute. Sliders now move in tenths where needed (for example pH).
  • 2.8 (23 Oct 2026): variables. New steps: Variable (remember a number, count up, or pick a random number), If variable and Show variable (send it to an LED bit, a digit, a servo or a motor, or print it on the LCD with {name}). New part: Dimmable LED (PWM brightness 0 to 100 %). The code now declares your variables and uses random() and analogWrite().
  • 2.7 (23 Oct 2026): works with touch on phones, tablets and iPads: tap parts to add them, scrolling no longer gets stuck on the part list, the circuit can be panned and pinch-zoomed, and the on-screen buttons and keys react to a finger. The relay now shows the real single-phase mains side: a wall socket with Live (brown), Neutral (blue) and Earth (green-yellow), the Live wire going to COM, NO going to the load (fan, light, AC or pump, which spins or glows when the relay is on), and a clear mains caution in the drawing, the checks, the guide, the parts list and the generated code. New palette items: Relay + fan, light, AC, pump.
  • 2.6 (23 Oct 2026): five new parts: a 7-segment digit, a NeoPixel ring (8 LEDs), a 4x4 keypad, an IR remote with receiver, and a Bluetooth HC-05 module with phone-app buttons. The keypad, remote and phone have on-screen buttons you can click while the simulation runs. 22 new projects use them in the Project Library.
  • 2.5 (23 Oct 2026): the three boards (Uno R3, Nano and Mega 2560) are now shown as realistic top-view photographs, with the pins, labels and wire ends placed exactly on the real sockets: Uno 10 + 8 digital and 8 + 6 power and analog, Nano 15 pins on each side, Mega with its three top and three bottom headers and the 2 x 18 header on the right.
  • 2.4 (23 Oct 2026): every circuit is now powered the realistic way by default: a 5 V wall adapter plugged into an MB102 power module feeds the red and black rails, and the Arduino runs from USB. A new Power menu next to Speed lets you switch back to the Arduino 5V pin.
  • 2.3 (23 Oct 2026): the 5 V supply is now a wall adapter plus an MB102 power module that feeds the red and black rails; the Arduino runs from USB and shares GND. Full screen now fits the whole circuit without scrolling.
  • 2.2 (23 Oct 2026): parts list is now a collapsible panel above the circuit; touch the drawing itself: turn the potentiometer knob, drag an object towards the ultrasonic sensor and read the distance, press buttons and touch pads, drag the sun towards or away from the light sensor, drag a magnet to the reed switch, drag a flame, heat source, water or smoke to its sensor; full-screen button; light and dark mode.
  • 2.1 (23 Oct 2026): 19 new parts (RGB LED, passive buzzer, I2C LCD, 4-digit display, stepper, L298N motor driver, DHT11, joystick, gas, flame, sound, rain, water level, flex, tilt, reed, touch, slide switch, DS18B20), an LCD text step, 8 more examples, and the new Project Library where every project opens with its circuit ready to run.
  • 2.0 (22 Oct 2026): switch between Arduino Uno, Nano and Mega 2560; lifelike drawings of the boards, sensors and modules; every wire shown and listed in colour; power hardware (12 V SMPS adapter, 9 V battery, 4 x AA pack, 5 V supply); do’s, don’ts, cautions and tips for every part; wire table and guides added to the PDF.
  • 1.0 (22 Oct 2026): first release. Arduino Uno, 13 parts, 8 examples, step builder, code generator, simulation, parts list with store search links, PDF and project file export.