fritzing Two color LED module User guide

Page 1

Two color LED module

2.0v ~ 2.5v
Using Current
10mA
Diameter
3mm / 5mm
Package Type
Diffusion
Color
Red + Green
Beam Angle
150
Wavelength
571nm + 644nm
Luminosity Intensity
20-40; 40-80
Module
Breadboard
Arduino
G
330Ω resistor
Pin 10
R
330Ω resistor
Pin 11
Y GND
Two color LED module for Arduino, emits red and green light. You can adjust
the amount of each color using PWM.
This module consist of a common cathode 3mm or 5mm red/green LED.
Since operating voltage is 2.0v ~2.5V, you'll need to use limiting resistors to
prevent burnout when connecting to the Arduino.

Pinout and Connection to Arduino

We'll use a couple of 330Ω resistors to limit the current from the Arduino and prevent burning the
LED.
Page 2
Arduino Example Sketch
The following Arduino sketch will gradually alternate between red and green color.
int redpin = 11; // pin for red signal int greenpin = 10; // pin for green signal int val;
void setup() {
pinMode(redpin, OUTPUT); pinMode(greenpin, OUTPUT); }
void loop() {
for(val = 255; val > 0; val--) { analogWrite(redpin, val); //dim red analogWrite(greenpin, 255 - val); // brighten green delay(15); } for(val = 0; val < 255; val++) { analogWrite(redpin, val); //brighten red analogWrite(greenpin, 255 - val); //dim green delay(15); } }
Loading...