RGB LED (BL-L515) [D006]
https://www.youtube.com/watch?v=A9x5JjcyAf4
*GitHub : https://github.com/rdiot/rdiot-d006.git
* Specs
5.0mm Round Type, RGB Full Color LED Lamps
Diffused and Water clear lens are available.
Popular T-1 diameter package.
IC compatible /Low current capability.
RoHs Compliance
* Contents
- DataSheet : http://www.alldatasheet.com/datasheet-pdf/pdf/699972/BETLUX/BL-L515.html
- Connect
R ----- D11
GND ----- GND
G ----- D10
B ----- D9
- Key Code
int redPin = 11;
int greenPin = 10;
int bluePin = 9;
void setup()
{
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop()
{
setColor(255, 0, 0); // red
delay(1000);
setColor(0, 255, 0); // green
delay(1000);
setColor(0, 0, 255); // blue
delay(1000);
setColor(255, 255, 0); // yellow
delay(1000);
setColor(80, 0, 80); // purple
delay(1000);
setColor(0, 255, 255); // aqua
delay(1000);
}
void setColor(int red, int green, int blue)
{
analogWrite(redPin, red);
analogWrite(greenPin, green);
analogWrite(bluePin, blue);
}
'3) Actuator > LED' 카테고리의 다른 글
Magic Cup Light Module (KY-027) [D020] (0) | 2016.09.18 |
---|---|
RGB LED Module SMD (KY-009) [D008] (0) | 2016.09.18 |
RGB LED Module DIP (KY-016) [D007] (0) | 2016.09.18 |
7 color flash LED Module (KY-034) [D010] (0) | 2016.09.18 |
2 Color(R,G) LED Module (KY-011) [D005] (0) | 2016.09.18 |