The RGB LED has four leads. There is one lead going to the positive connection of each of the single LEDs within the package and a single lead that is connected to all three negative sides of the LEDs.
The common negative connection of the LED package is the second pin from the flat side of the LED package. It is also the longest of the four leads. This lead will be connected to ground.

Each LED inside the package requires its own 270Ω resistor to prevent too much current flowing through it. The three positive leads of the LEDs (one red, one green and one blue) are connected to Arduino output pins using these resistors.
If you are using a common ANODE LED instead of common CATHODE, connect the long pin to +5 instead of ground

This guide was first published on Nov 30, 2012. It was last updated on Mar 08, 2024.

This page (Breadboard Layout) was last updated on Oct 02, 2012.

Text editor powered by tinymce.