Free demo: level 1 (5 challenges: the terminal, your first wiring, Blink, a button and UK traffic lights). Levels 2 to 4 (buzzers, PWM, motion, RGB, Linux skills, cron, servos and the HC-SR04) and Free play are in the full version.
About this simulator
A Raspberry Pi 5 on your screen: type real Linux commands in its terminal, wire LEDs, buttons and sensors to its 40-pin header, and write Python with gpiozero to control them.
How it works
- Read the goal. Each challenge says exactly what the checker tests, and the Learn box shows the commands or code you need, with an example.
- Wire it. Click a pin on the Pi's header, then a terminal on a part, to add a jumper wire. Click a wire to take it off. Every pin is labelled like a pinout chart: GPIO pins in green, 3V3 in orange, 5V in red and GND in black.
- Code it. Write Python in the editor (it saves as you type), then press ▶ Run, which types
python3and your file name into the terminal for you. ■ Stop is Ctrl+C. Hold the buttons on the drawing, wave at the motion sensor and move the sliders while it runs. - Use the terminal. It works like the one on a real Pi:
ls,cd,mkdir,cat,nano,python3,pinout,vcgencmd,crontab,sudo rebootand more. Typehelpto see them all. - Check it. ✓ Check copies your wiring and files to a fresh Pi, runs it for several simulated seconds, presses buttons and moves the sensors like a person would, and tells you what passed and what didn't.
- Earn stars. One for working, one for doing it without hints or the answer, and one for the bonus goal. Passing a challenge on any day keeps your streak going.
- Everything is saved in this browser: your files (the Pi's home folder), your wiring for each challenge, your crontab and your command history.
The levels
| Level | Challenges |
|---|---|
| 1 First boot (free) | Hello, Pi · Light it up · Blink · Press to light · UK traffic lights |
| 2 Inputs and outputs | Doorbell · Breathing light · Motion light · Reaction timer · Colour mixer |
| 3 Linux skills | Flash it N times · Temperature watch · Log every press · Safe shutdown button · Start on boot |
| 4 Sensors and motors | Servo sweep · Measure distance · Parking sensor · Burglar alarm · Automatic gate |
| 5 Free play | Every part on the bench and no checker: build your own project |
Pins: the thing everyone gets wrong at first
gpiozero uses GPIO numbers (also called BCM numbers), not the pin numbers printed on the header. LED(17) means GPIO17, which is on pin 11. The drawing shows both: the number on each pin is its position, and the label beside it is its name. Type pinout in the terminal to see the whole chart, just as on a real Pi.
The GPIO pins work at 3.3 V. The two 5V pins come straight from the power supply and are for powering parts like the PIR sensor, the servo and the HC-SR04, never for a GPIO pin. Put 5 V into a GPIO pin here and, like on a real Pi, the pin is damaged. Join two power pins together with a button and the Pi's power cuts out.
The parts
| Part | What it does here |
|---|---|
| LEDs (red, amber, green) | Each has a 330 Ω resistor fitted, so about 4 mA flows from a 3.3 V GPIO pin. |
| RGB LED | Common cathode: the − leg goes to GND, and R, G and B each have their own 330 Ω resistor. |
| Push buttons | Join their two legs while held. gpiozero's Button turns on the Pi's internal pull-up, so wire one leg to the GPIO pin and the other to GND. |
| Active buzzer | Beeps by itself (about 2.3 kHz) whenever its + leg is high. Turn the sound on with 🔊. |
| PIR motion sensor (HC-SR501) | Needs 5 V on VCC. Its OUT pin gives 3.3 V, so it can go straight to a GPIO pin, and stays high for about 3 seconds after movement (the shortest setting of its time knob). |
| SG90 servo | Brown to GND, red to 5V, orange signal to a GPIO pin. Pulses of 1 ms to 2 ms turn it from −90° to +90°, at about 0.1 s per 60° (the SG90 datasheet figures). |
| HC-SR04 distance sensor | Needs 5 V. Its ECHO output is a 5 V signal, so the Pi reads it through a 1 kΩ and 2 kΩ divider (the ECHO ÷ terminal), which brings it down to 3.3 V. |
How accurate is it?
The simulated Pi is a Raspberry Pi 5 running Raspberry Pi OS (Debian 13 "trixie") with Python 3.13 and gpiozero 2.0. The terminal's messages, the pinout chart, vcgencmd and crontab follow the real ones word for word, and gpiozero's classes behave as the library's own source code does: the same defaults (like Button's pull-up and MotionSensor's smoothing), the same errors (like GPIOPinInUse, or GPIO busy when two programs use one pin), the same warnings on a Pi 5, and the same habit of switching everything off when the program ends (which is why so many programs finish with pause()).
What it doesn't do: Python's speed is an estimate (about 5 microseconds a line), and the buttons here don't bounce. Tracebacks show your own lines but not the library's, and leave out the ^^^^ markers Python 3.13 adds. nano opens in the editor beside the terminal instead of inside it, and saves as you type. There's no internet, so apt and pip can't install anything, and there's no desktop, camera or I2C and SPI devices: everything is about the terminal and the GPIO pins.