RGB 3 Color LED Module KY-016 in Arduino

Learn using RGB 3 Color LED Module KY-016 in Arduino. RGB LED module is capable of producing lights of different color using a single LED. We can generate light of any color code through this module. In this, we will generate lights of all color. We are using Arduino UNO and RGB 3 Color LED Module KY-016 for this. So, let’s start.

First, let’s start with the basics of the RGB LED module.

Operating Voltage: 5V
LED drive mode: Common cathode driver
LED diameter: 5mm

Step 1: Required Components

RGB LED module x 1
Breadboard x 1
Arduino UNO Board x 1
Jumper Wires

Step 2: Circuit Time

Circuit of RGB 3 Color LED Module KY-016 in ArduinoMake the circuit as per given diagram. Connect red LED pin to pin 7 of Arduino. Then, connect the green LED pin to pin 9 of Arduino. Now, connect the blue LED pin to 8 of Arduino. Connect (-) pin of the module to GND pin of Arduino. RGB LED module will not require any limiting resistors.


Step 3: Code Time

This is code for RGB LED module in Arduino. Firstly, we declare pins for red, green and blue pins. Then, set the declared pins in output mode. We use ‘for’ loop to generate light of all color code. The first loop generates color in decreasing order, whereas the second loop generates color in increasing order. You can use the serial monitor to determine light of which color code is generated.

Step 4: Upload the code to Arduino

Upload the above-given code to the Arduino UNO Board after the components are set as per the Circuit Diagram. Now you can see RGB lights of different colors generating subsequently.

For information about uploading code to Arduino UNO Click Here.

Leave a Reply