Patches, nodes and wires
A Runeweave program is drawn, not typed. Four words cover almost everything.
Patch
A patch is one drawing: a set of nodes and the wires between them. A program starts at its main patch, @/main.
Node
A node is a block on the patch. Each node is an instance of another patch: sdp/time/clock ticks at a steady rate, sdp/logic/flip-flop remembers on or off, sdp/gpio/digital-write sets a pin. You can make your own patches and use them as nodes, so a big program is built from small ones.
Pin
Nodes have pins: inputs on the left, outputs on the right. Every pin has a type, such as boolean (on or off), number or pulse (something happened).
An input with no wire can hold a fixed value instead, typed straight into the node: the clock's interval, 0.25 seconds, or the pin a light is on, D13.
Wire
A wire (a link) joins an output to an input:
- An output can feed any number of inputs.
- An input takes at most one wire.
- Both ends must have compatible types. Runeweave tells you while you draw if they don't.
Inside a node
A patch you make becomes a node with pins. To give it pins, put terminal nodes inside it: an input-number terminal becomes a number input on the outside, an output-boolean terminal a boolean output. Patches all the way down end in native nodes, whose behaviour is written in C++ (for microcontrollers) or Verilog (for FPGAs). The standard library provides the native nodes you need to start.
Next: your first program.