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.
An RGB LED is three LEDs in one: red, green and blue. Give each its own PWM pin and mix any colour from three numbers.
| Pin | Connects to | What it does |
|---|---|---|
D9 | Resistor, then the red leg | Red brightness, 0-255. |
D10 | Resistor, then the green leg | Green brightness, 0-255. |
D11 | Resistor, then the blue leg | Blue brightness, 0-255. |
GND | The long common leg | Common cathode: all three colours return here. |
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.
VCC to 5V, GND to GND, TRIG to D9, ECHO to D10. A 10 µs pulse on TRIG starts a ping; ECHO's pulse length is the round trip.
| Part pin | Board pin |
|---|---|
| VCC | 5VWire colour red |
| TRIG | D9Wire colour yellow |
| ECHO | D10Wire colour green |
| GND | GNDWire colour black |