Lab mode overview
Lab mode is the full simulator, and it is the Lab tab in the top bar. The workspace (the app you get by default) is built around an objective: statement, shop, tests, submit. Lab mode drops the task and gives you the whole bench instead: drag-and-drop wiring, an inspector for every part, live data feeds, instruments, a shell, projects and sharing.
The Sandbox's Lab mode button opens it too. The tab keeps its state: switch to Today or the docs and back, and your board, the running program and the console are still there. Its addresses name what is open — /lab/project/<id>, /lab/share/<slug>, /lab/live/<id>, /lab/example/<id> or /lab/bench/<n> — so they work as bookmarks and links (see Projects). See what PyRasp is for how Lab mode fits with the contest and the sandbox.
When to use Lab mode
Use Lab mode when there is no objective to solve:
- designing a circuit by hand, then running
main.pyto see it work; - trying a sensor with a made-up or live value before wiring a real program around it;
- watching signals on the logic analyzer or bus sniffer;
- keeping boards as projects, taking snapshots and sharing links;
- saving a wired cluster as a reusable module.
Use the workspace when you want to solve a daily or practice objective: it has the statement, Run tests, Submit and the score. Lab mode has no judge and no clock, so nothing you do here is scored. How a run works describes the circuit.py → power-on → main.py sequence that both modes share.
Around the screen
The canvas is the centre; everything else is a panel around it.
| Area | What it does |
|---|---|
| Top bar | Project name and save status, Run / Pause / Stop, speed, simulated clock, Select and Wire tools, wire colour swatches, undo and redo, Fit, Current, and the Projects, World, Share, History and sound menus. |
| Left: Parts | Every part in the shop grouped by kind, and your saved modules. Drag one onto the board. There is a search box. |
| Centre: canvas | The board and the grid. Scroll to zoom, drag empty space to pan, and press Fit to frame everything. Hovering a pin shows its label and, while running, its voltage. |
| Right: Inspector | Everything about the selected part, wire or selection. See the inspector. |
| Bottom: Code and instruments | The code editor for main.py, the program console, and the instrument tabs. See instruments and the console shell. |
| Bottom bar | Electrical warnings. Clicking one selects the part that raised it. |
Running, stopping and speed
Run (or the Space bar) powers the board and starts main.py; Pause freezes simulated time; Stop ends the run and unlocks editing. The speed menu runs the simulation from 0.1× to 100×, and the clock beside it shows simulated time as minutes, seconds and milliseconds.
Editing is only possible while the simulation is stopped. While it runs, the toolbar's edit buttons and the palette are disabled, and the palette hint says "Stop the simulation to edit". You can still click interactive parts on the canvas — a push button, a keypad, a switch — to press or flip them, and the board's GPIO panel in the inspector can drive pins by hand.
Seeing the current
While the board runs, a little blue whirl travels along every wire and breadboard column that carries current, the way current goes: out of a supply or a GPIO pin set high, through the parts, and back to ground. It spins as it goes, like a spiral wound round the wire. A long wire gets two. Current in the top bar turns them on and off; the setting is remembered in your browser.
- Speed is current. Whirls crawl for a fraction of a milliamp and race for 20 mA, on a log scale so both are easy to see. A series resistor visibly slows them down; a short makes them fly.
- Direction is current direction. Follow the whirls of an LED circuit from the GPIO pin through the resistor and the LED and back to a GND pin.
- Breadboards too. Current along a breadboard column is shown between the holes it passes, so you can see which column carries it.
- PWM shows its average current, and a wire with no current (a pull-up's microamps, an input pin) has no whirl. Hover a pin to read its voltage.
Lights follow how bright a real part looks rather than its current: an LED glows faintly at 0.1 mA, clearly at 1 mA and close to full at the 5 mA a 330 Ω resistor gives it.
The grid
The canvas is a grid of 10-pixel cells: one cell is 2.54 mm, the pitch of the real GPIO header, so parts land where their pins fall on 0.1-inch centres. Everything you drop is snapped to cells, and dragging moves in whole cells, so nothing sits half a pitch off. Breadboard holes are part of the model: a leg dropped into a hole connects to the strip inside the breadboard automatically.
Going deeper: what is simulated
Lab mode runs the same engine as the workspace: a component netlist, a solver that computes voltages and currents, buses for I²C, SPI, UART, 1-Wire, DHT and WS2812 traffic, a world model for weather and rooms, and a Python runtime (Pyodide) for circuit.py and main.py. The differences are the interface and the services: Lab mode exposes feeds, instruments and project management directly, while the contest's judge and leaderboard are not part of it.
Everything you build here is an ordinary project. Save it to the server and you can share it, fork it, or open it from the Sandbox like any other build.