Loading the figure…
Stopped · Your code isn't running yet. Until you press Run, the board runs the program already on it.
Nothing printed yet. Press Run.
Not checked yet
Run your code to check it. The checks replay a fixed script on a virtual clock, so the same code always gets the same result.
Each fault really happens in the simulation. Trigger one, watch the figure, then read why.
Change a value here or click a chip in the code.
A servo turns to the angle you ask for and holds it. The Servo library sends a pulse every 20 ms: 1 ms wide for 0°, 2 ms for 180°.
| Pin | Connects to | What it does |
|---|---|---|
GND2 | The brown wire | Ground. |
5V | The red wire | The motor's supply. |
D9 | The orange wire | The position pulse. |
Sensors and actuators this board drives, with the real connections.
Brown to GND, red to 5V, orange to a pin (D9). Servo.attach(9) then write(0..180).
| Part pin | Board pin |
|---|---|
| GND | GNDWire colour brown |
| VCC | 5VWire colour red |
| SIG | D9Wire colour orange |
A moving servo can draw 250 mA and a stalled one 700 mA. More than one servo needs its own 5 V supply, with the grounds joined.