QB014 RGB Module

1.Product Introduction

../../_images/RGB-1.jpg

RGB module is a kind of integrated red, green, blue three basic color LED (Light Emitting Diode) module, composed of red, green and blue three independent lamp beads, common has four pins, a public port and three color control ports. We can control the red, green and blue three independent lamp beads separately through the control port, so as to realize the light mixing effect and produce a variety of different color effects.

2.Parameter Specification

Parameter Value/Representation
Operating voltage 3.3~5V
Operating temperature -30°C~+70°C
Color of light RGB three colors
Peak wavelength 625nm; 470nm; 530nm
Control signal Digital signal
Size 3.16cm*2.38cm
../../_images/RGB-2.jpg

3.Wiring Diagram

../../_images/RGB-3.png
RGB Module UNO
GND GND
G Digital Pin 4
R Digital Pin 5
B Digital Pin 3

4.Sample Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//Set the RGB pin
int redpin=5;
int bluepin=3;
int greenpin=4;
int val;
void setup(){
  pinMode(redpin,OUTPUT);
  pinMode(bluepin,OUTPUT);
  pinMode(greenpin,OUTPUT);
}
void loop()
{
  for(val=255;val>0;val--){
    analogWrite(4,val);
    analogWrite(5,255-val);
    analogWrite(3,128-val);
    delay(1);
  }
  for(val=0;val<255;val++){
    analogWrite(4,val);
    analogWrite(5,255-val);
    analogWrite(3,128-val);
    delay(1);
  }
}

5.Test Result

After the code is uploaded to the controller board, the RGB light will light up and the display light color will change in the order of cyan and pink.

../../_images/RGB-4.png

6.Related Resources

7.Get One Now

B2B Business: info@acebott.com

Individual buyer: shop on aliexpress