What PyRasp is
PyRasp is a Raspberry Pi simulator in the browser. You write two Python files — circuit.py, which buys and wires the parts, and main.py, which is the program that runs on the board — and PyRasp tells you what the circuit and the program would do. It is free, and everything runs in your browser: no account is needed.
The pieces of PyRasp
The daily problem. Every UTC day has one problem, the same for everyone. There is no clock: press Run tests as often as you like, and the first time every check passes the day counts as solved. Solve it on consecutive days to build a streak. See the daily problem.
Practice. 166 Raspberry Pi problems in seven topic sets, from LEDs to complete projects, 77 problems for the Raspberry Pi Pico, and every past daily problem. Nothing there is timed: run the tests as often as you like. The Practice item in the top bar also holds the campaign and the daily problem. See practice.
The sandbox. A scratch workspace with no task, no tests and no budget. It sits under Lab in the top bar, next to the full simulator and your components.
Custom components. Turn wiring you trust into a part of your own and import it in any build. Share one and anyone with the link can read it and add it to their library. See custom components.
Lab mode. The full simulator, in the Lab tab: drag-and-drop wiring, the inspector, live data feeds, instruments, projects and saved modules. Use it to design and debug a circuit by hand; use the workspace when you have a task to solve. See Lab mode.
What the simulator is not
- It is not a real Raspberry Pi. It does not run Raspberry Pi OS, and it has no HDMI or USB (programs can still reach the internet; see network access). It simulates the GPIO header and the parts on the board, not the whole computer.
- It is not an electronics course. Parts behave sensibly and safely: an overloaded LED raises a warning (or burns out, depending on the part's settings), but nothing catches fire. Real hardware is less forgiving.
- It is not open-ended. You can only use the parts in the shop and the Python libraries listed in Programming the Pi. Anything else is a missing part, not a missing feature.
Accounts
You don't need one. Your builds, Lab projects, components and progress are saved in this browser as you work, so a dropped connection or a closed tab doesn't lose them.
An account is optional and free: sign up with an email and a password, or with GitHub. Signed in, your projects, your component library and your progress (solved problems, streaks, stars) are kept in the account too, so they follow you to other devices. You also need one to share a Lab board or a component as a link, and for the relay that some programs' network requests go through (see network access). Your password is checked in your browser; the server never sees it.
Boards are free, parts cost money
Every build gets one Raspberry Pi — a Pi 4 B by default, or a Pi 5 / Pi Zero 2 W — and it never appears on the bill. Everything else is bought from the shop: an LED is $1, a resistor $0.25, a GPS module $15. Each daily and practice problem has a budget, and a build over budget fails its tests; the sandbox lets you spend without limits.
Going deeper
- The tests run in your browser, and the run is deterministic: the same files give the same result every time.
| - Boards differ in a few ways — pin labels, GPIO count, 5 V behaviour. | Board | Python | GPIO pins | Note |
|---|---|---|---|---|
| Raspberry Pi 4 Model B | Pi() | 28 | GPIO pins are 3.3 V only. 5 V on any GPIO can permanently damage the SoC. | |
| Raspberry Pi 5 | Pi("pi5") | 28 | GPIO now goes through the RP1 chip: RPi.GPIO does not support the Pi 5 on real hardware. Use gpiozero (with lgpio) — the simulator accepts both. | |
| Raspberry Pi Zero 2 W | Pi("pi-zero-2w") | 28 | The header holes ship empty: solder a 2×20 header before wiring. |