PyRaspBeta

Editing and wiring by hand

Everything on the canvas is edited while the simulation is stopped. This page covers the gestures and commands; the inspector covers the values behind a selected part.

The grid, in practice

The board is laid out in 10-pixel cells (2.54 mm at 1×). Dragging a part snaps it to the cell under the pointer, and dragging a selection moves every part by the same whole number of cells, so relative positions never drift. Zoom with the scroll wheel (0.25× to 8×), pan by dragging empty space, and press Fit in the top bar to frame the whole board again.

Placing a part

Open the Parts panel on the left and drag an entry onto the canvas. Parts are grouped by kind (Outputs, Sensors, Displays, …), and the search box filters by name, category and slug. A dropped part gets sensible defaults and is selected straight away, so you can set its colour, value or options in the inspector.

Legs that land on breadboard holes connect automatically to the strip under them. That is how a resistor and an LED placed side by side become one circuit without a wire between them.

Drawing wires

  1. Press W (or the Wire button) to switch to the wire tool.
  2. Click the first pin. A pending wire follows the pointer.
  3. Click the second pin to connect them. The wire is added as one undoable edit.

A click that misses every pin abandons the wire; so does Escape, which also returns you to the Select tool. Pins highlight as you hover. Before you draw, pick a colour from the swatches in the top bar; the wire uses it, and you can recolour any wire later from its inspector entry.

Wires are routed for you: the connector becomes an elbow path that runs around the parts. To delete one, click it (the inspector shows from → to) and press Delete.

Selecting, moving and multi-selecting

  • Click a part to select it. Dragging it moves it.
  • Click a part in a group selects the whole group. Alt-click picks that one part out of its group instead.
  • Shift-click adds a part to the selection or removes it. Dragging any selected part moves everything selected at once.
  • Shift-drag on empty board draws a selection box; parts entirely inside it are selected, and the groups they belong to come along.

The selection inspector (right panel) lists how many parts are selected and offers Group, Ungroup, Rotate each and Delete, plus Save module.

Rotating

R turns each selected part a quarter-turn clockwise. In a multi-selection every part turns in place — the selection does not rotate around its centre. The same command is the Rotate button in the inspector. Use it when a footprint reads better the other way: headers pointing down, a DIP past its breadboard channel, a display facing right.

Deleting

Delete or Backspace removes the selection. Removing a part also removes the wires attached to it, and undo brings back both the part and its wires. A wire can be deleted on its own from the wire inspector.

Groups

Select two or more parts and click Group (or press Ctrl/⌘ G) to make them one unit: clicking any member selects the group, and dragging moves it whole. The selection inspector's name field names the group; the default is Group. Ungroup (Ctrl/⌘ Shift G) releases the parts again.

A group is a convenience, not an electrical part: its members stay separate on the board, each with its own settings. Grouping is an ordinary edit and undoes like any other.

Saved modules

A module is a cluster of wired parts kept as a reusable piece — "my soil sensor front end" — with its settings and the wires between them. Select the parts, type a name and choose Save module in the selection inspector. It appears under Modules in the Parts panel.

  • Drag a module onto the board: its parts are placed with fresh ids, the internal wires come along, and the whole drop is one undoable step (it also arrives grouped).
  • ⤓ exports it as a .raspsim-module.json file, which you can send to someone else; Import module… reads one back.
  • ✕ removes it from your library.

Modules live in this browser, alongside your local projects. If a module uses a part this version of PyRasp does not have, placing it is refused with a message naming the missing parts. The Module class in circuit.py is a different, code-side way to reuse a design; see wiring modules.

Undo and redo

Every board edit — place, move, rotate, group, wire, delete, settings — is stored as an operation with an inverse, and Ctrl/⌘ Z walks back through the last 200 of them. Ctrl/⌘ Shift Z or Ctrl/⌘ Y redoes. Code edits are separate: the code editor keeps its own undo history, so typing in main.py does not consume board undo steps.

Deleting a part also removes the wires attached to it, and one undo brings both back.