An RGB LED packages red, green, and blue LEDs together so a circuit can mix colors by controlling each channel.
How students use it
Students use it for color indicators, mood lights, feedback states, and PWM color-mixing projects.
Pins and power
Four pins: common cathode plus red, green, and blue. SunFounder notes the longest pin is the common cathode; the adjacent left pin is red, and the two right pins are green and blue.
Common cathode RGB LED. Each color channel needs its own current-limiting resistor.
The kit uses a common cathode RGB LED, so the shared pin goes to GND and each color pin is driven high through current limiting.
Voltage and safety
Each color has a different forward voltage, so resistor values and brightness can differ by channel.
Do not drive any color channel without current limiting. Keep total current within Pico and power-source limits.
Datasheet notes
SunFounder lists: common cathode, 5mm clear round lens, red forward voltage DC 2.0-2.2V, blue/green DC 3.0-3.2V at 20mA, 0.06W DIP RGB LED, and 30 degree viewing angle.
Common libraries
Use three PWM outputs with machine.PWM for color mixing.
Common mistakes
Treating it like one LED, using only one resistor on the common pin, mixing up common anode and common cathode code, and swapping red/green/blue pins.