Parts · Lights and sound
LED
5 mm LED, red, yellow, green, blue
A light that shines one way only: the long leg goes to +. Always with a resistor.
Parts · Lights and sound
5 mm LED, red, yellow, green, blue
A light that shines one way only: the long leg goes to +. Always with a resistor.

| Pin or leg | What it is for |
|---|---|
| Long leg (+, anode) | to the pin, through the resistor |
| Short leg (-, cathode) | to GND; the rim is flat on this side |
The idea behind it, step by step: LED
| Current | about 10-20 mA |
|---|---|
| Voltage across it | about 2 V (red) to 3 V (blue) |
| 3 mm | smaller, used the same way |
|---|---|
| RGB LED | red, green and blue in one, with 4 legs |
| Addressable LED (WS2812B) | an LED with its own chip: see the LED strip |