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 Pi has no analogue outputs, so brightness comes from pulse-width modulation: PWMLED switches GPIO18 fast and sets how long each pulse stays on.
| Pin | Connects to | What it does |
|---|---|---|
GPIO18 | 330 Ω resistor and LED | PWM output |
GND | LED's short leg | Return |
Sensors and actuators this board drives, with the real connections.
Signal to GPIO18 on pin 12, red to 5V, brown to GND. gpiozero's Servo and AngularServo make the 50 Hz pulses in software, so expect a little jitter; a PCA9685 board gives steady pulses.
| Part pin | Board pin |
|---|---|
| signal | GPIO18Wire colour orange |
| V+ | 5VWire colour red |
| GND | GNDWire colour brown |
A servo's stall current comes out of the Pi's 5 V rail. One SG90 is fine; for more, give them their own 5 V supply with a common ground.