Tuesday, October 20, 2020
Home Arduino Strarter Kit KY-009 Arduino RGB Module

KY-009 Arduino RGB Module

KY-009 is perhaps one of the basic output devices that you would love to use in your project. Sometimes you need multicolor led to show a state of the system. It can be used in different applications such as outdoor decoration lighting, stage lighting designs, home decoration lighting, LED matrix display, and more.
USA purchase link
UK purchase link
Germany purchase link

Specifications :

  • Operating Voltage  5V max
    Red 1.8V ~2.4V
    Green 2.8V ~ 3.6V
    Blue 2.8V ~ 3.6V
  • Forward Current 20mA ~ 30mA
  • Operating Temperature -25°C to 85°C [-13°F ~ 185°F].

How does an RGB Led Work :

An RGB led produces any color by mixing color from the three internal primary LEDs, red, green and blue. By controlling the intensity of individual LEDs and combining them, you can create any color
There are 2 types of RGB less depending on whether they share a common ground or common VCC.

  • Common Anode
  • Common Cathode

The KY-009 is a common anode RGB led which means that they share a common ground


KY-009 Pin Configuration :

There are four pins of the KY-009 Module.

  • The Anode pin (-)which is common ground for all of the LEDs.
  • Next is the Signal pin of Green (G).
  • Then is The Signal pin of Red (R).
  • Lastly The Signal pin of Blue (B).

Pin Configuration

KY-009 Arduino Code :

// RGB LED KY-009 Module 

int Led_Green = 12;
int Led_Blue = 11;
int Led_Red = 10;
int val;
void setup () {
  //Output pin initialization for the LEDs
  pinMode (Led_Red, OUTPUT); 
  pinMode (Led_Green, OUTPUT); 
  pinMode (Led_Blue, OUTPUT); 
void loop () {
   // In this for-loop, the 3 LEDs will get different PWM-values
   // Via mixing the brightness of the different LEDs, you will get different colors. 
   for (val = 255; val> 0; val--)
       analogWrite (Led_Blue, val);
       analogWrite (Led_Green, 255-val);
       analogWrite (Led_Red, 128-val);
       delay (1);
   // You will go backwards through the color range in this second for loop.
   for (val = 0; val <255; val++)
      analogWrite (Led_Blue, val);
      analogWrite (Led_Green, 255-val);
      analogWrite (Led_Red, 128-val);
      delay (1);



Please enter your comment!
Please enter your name here

Most Popular


The KY-032 obstacle avoidance sensor is an infrared obstacle avoidance sensor. It comes with the 37 in 1 starter kit for Arduino. It helps...

HIH-4000 | Humidity Sensors

The HIH-4000  sensors are one of the highly efficient humidity sensors you can buy. The HIH-4000 is an analog humidity sensor. It is useful...


The KY-026 Arduino Flame Sensor is a low-cost starter sensor. It normally comes in the starter kit of Arduino like the ky-039. It can...


The KY-039 Heartbeat sensor is one of the cheapest sensors to get a start on Arduino like the Sound sensor. It cost less than...

Recent Comments