Objective:

RGB module has 4 pin R,G,B,GND( standing for Red,Green,Blue and Ground). When R,G,B pins get different values of PWM signal, its LED will show different colors. In this project, we will use Arduino UNO R3 to  feed different value to RGB module and output different colors.

Parts and Devices:

Arduino UNO R3 x 1

USB cable x 1

Breadboard x 1

RGB module x 1

Jumper wires

Circuit Graph:

RGB_1_bb

Sample code
Please download sample code from https://osoyoo.com/wp-content/uploads/2016/07/RGB.ino, unzip the file and load it into Arduino IDE.

Result:

After running the code, the LED in RGB module will constantly change colors.

IMG_20160721_145115 IMG_20160721_145120