PyRaspBeta

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 built around a daily contest, with plenty of room to practise and experiment outside it.

The pieces of PyRasp

The daily contest. Every day at 00:00 UTC a new objective is published, and it stays hidden until you press Start. Starting begins a clock on the server that keeps running even if you close the tab: 1 hour for an easy objective, 2 for medium, 3 for hard. You submit your two files, the server's judge checks them, and the fastest and cheapest accepted build wins the day. See the daily contest.

Practice. 166 practice problems in seven topic sets, from LEDs to complete projects, plus every past daily. Nothing there is timed or ranked: run the tests as often as you like, and share a build when you're happy with it. See practice.

The sandbox. A scratch workspace with no task, no clock and no score. Its Lab mode button opens the full simulator in the Lab tab.

Community builds. When you post a build with Share, other makers can read it, like it and open it in their own sandbox to modify. Winning builds from past days can be opened the same way from the day's leaderboard. See posting a build.

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 network, HDMI or USB. 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.

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 contest objective has a budget, and a build over budget cannot be submitted; the sandbox lets you spend without limits.

Going deeper

  • The same judge runs in your browser (Run tests) and on the server (Submit), so what you see during practice is what the contest will decide. The run is deterministic: the same files give the same result every time.
  • Everything apart from these docs needs an account: signed out, you see the front page. Builds in the workspace and the sandbox are saved in your browser as you type, so a dropped connection doesn't lose them.
- Boards differ in a few ways — pin labels, GPIO count, 5 V behaviour.BoardPythonGPIO pinsNote
Raspberry Pi 4 Model BPi()28GPIO pins are 3.3 V only. 5 V on any GPIO can permanently damage the SoC.
Raspberry Pi 5Pi("pi5")28GPIO 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 WPi("pi-zero-2w")28The header holes ship empty: solder a 2×20 header before wiring.