KY-029 Dual Color LED Module

KY-029 Description

5mm dual color LED module KY-029 for Arduino, emits red and green light. You can adjust the amount of each color using PWM. This module is similar to KY-011.

KY-029 Specifications

This module consists of a  common cathode 5mm red/green LED and a 0Ω resistor. Use this module with some limiting resistors to prevent burnout of the LED when working for long periods of time.

Operating Voltage2.3-2.6V for green, 1.9-2.2V for red
Working Current20mA
Diameter5mm
Package TypeDiffusion
ColorRed + Green
Wavelength571nm + 625nm
Luminous Intensity20~40mcd,  60~80mcd

KY-029 Connection Diagram

We'll use a couple of 330Ω resistors to limit the current from the Arduino and prevent burning the LED.

KY-029BreadboardArduino
-GND
middle330Ω resistorPin 11
S330Ω resistorPin 10
Arduino KY-029 Dual color LED connection diagramclick to enlarge

KY-029 Example Code

The following Arduino sketch will gradually alternate between red and green color.

int redpin = 11;  // pin for the red LED
int greenpin = 10;// pin for the green LED
int val;

void setup() 
{
  pinMode(redpin, OUTPUT);
  pinMode(greenpin, OUTPUT);
  Serial.begin(9600);
}

void loop() 
{
  for(val = 255; val > 0; val--)
  {
    analogWrite(redpin, val);
    analogWrite(greenpin, 255 - val);
    delay(10);
  }
  Serial.println("Green");
  delay(1000);
  
  for(val = 0; val < 255; val++)
  {
    analogWrite(redpin, val);
    analogWrite(greenpin, 255 - val);
    delay(10); 
  }
  Serial.println("Red");
  delay(1000); 
}
guest
0 Comments
Inline Feedbacks
View all comments