Skip to product information
1 of 1

HK STEM CLUB

KY-029 雙色LED模組 - Dual Color Led Module

KY-029 雙色LED模組 - Dual Color Led Module

Regular price HK$15.00
Regular price Sale price HK$15.00
Sale Sold out
View full details

KY-029 雙色LED模組 - 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 Dual color LED module

  • KY-029 Fritzing custom part

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 Voltage 2.3-2.6V for green, 1.9-2.2V for red
Working Current 20mA
Diameter 5mm
Package Type Diffusion
Color Red + Green
Wavelength 571nm + 625nm
Luminous Intensity 20~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-029 Breadboard Arduino
- GND
middle 330Ω resistor Pin 11
S 330Ω resistor Pin 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); 
}