Getting Started with Arduino

Lesson 4 - RGB LED

Taken from page 46 of the ELEGOO Super Starter Manual.

RGB LEDs are a fun and easy way to add some color to your projects. Since they are like 3 regular LEDs in one, how to use and connect them is not much different.
They come mostly in 2 versions: Common Anode or Common Cathode.
Common Anode uses 5V on the common pin, while Common Cathode connects to ground.
As with any LED, we need to connect some resistors inline (3 total) so we can limit the current being drawn.
In our sketch, we will start with the LED in the Red color state, then fade to Green, then fade to Blue and finally back to the Red color. By doing this we will cycle through most of the color that can be achieved.

Component Required:
(1) x Elegoo Uno R3
(1) x 830 Tie Points Breadboard
(4) x M-M wires (Male to Male jumper wires)
(1) x RGB LED
(3) x 220 ohm resistors


Code Access:

Download and open the Code Zip file and follow the directory path:

Code > Lesson 4 RGB LED > RGB_LED > Click on the RGB_LED Arduino File and it should automatically open the Arduino IDE interface with the code for the lesson.