6bits Multicolor Rapid Prototyping LED [D050]
https://www.youtube.com/watch?v=CSUq8nZIrKM
*GitHub : https://github.com/rdiot/rdiot-d050.git
* Specs
2.54MM PIN 6 Digitals LED Board ,Can be inserted directly into Arduiuo UNO MEGA2560 DUE Board ,Ideal for linking up to your Arduiuo UNO Pro Mini Nano Mega2560 DUE Development Board etc,or others MCU Embedded development board (AVR STM32 STM8 STM0 ARM7 ARM9 ARM11 PIC C8051 C51 STC MSP430 FPGA/CPLD etc.)
6 bit 6 colors Common Cathode LEDs.
Multicolor are White Blue Chartreuse Yellow Pink Red.
7 PIN OUT 2.54mm
1K ohm Limiting resistor
Power Supply Voltage: 3.3-12V
LED & Resistor Package : 0603
Size: 17.78MM x 11.43MM
* Contents
- Key Code
int D1 = 13;//White
int D2 = 12;//Blue
int D3 = 11;//Chartreuse
int D4 = 10;//Yellow
int D5 = 9;//Pink
int D6 = 8;//Red
int GND = 7;//GND
int D11 = 6;//White
int D12 = 5;//Blue
int D13 = 4;//Chartreuse
int D14 = 3;//Yellow
int D15 = 2;//Pink
int D16 = 1;//Red
int i;
void setup() {
pinMode(D1, OUTPUT);
pinMode(D2, OUTPUT);
pinMode(D3, OUTPUT);
pinMode(D4, OUTPUT);
pinMode(D5, OUTPUT);
pinMode(D6, OUTPUT);
pinMode(D11, OUTPUT);
pinMode(D12, OUTPUT);
pinMode(D13, OUTPUT);
pinMode(D14, OUTPUT);
pinMode(D15, OUTPUT);
pinMode(D16, OUTPUT);
pinMode(GND, OUTPUT);
digitalWrite(GND, LOW);
}
// the loop routine runs over and over again forever:
void loop() {
//White LED light than any other color lights, so reducing the brightness
for(i=0;i< ms_cnt/6;i++)
{
digitalWrite(D1, HIGH);
delay(1);
digitalWrite(D1, LOW);
delay(5);
}
digitalWrite(D2, HIGH); // turn the LED on (HIGH is the voltage level)
delay(ms_cnt); // wait for a Millisecond
digitalWrite(D2, LOW); // turn the LED off by making the voltage LOW
digitalWrite(D3, HIGH); // turn the LED on (HIGH is the voltage level)
delay(ms_cnt); // wait for a Millisecond
digitalWrite(D3, LOW); // turn the LED off by making the voltage LOW
digitalWrite(D4, HIGH); // turn the LED on (HIGH is the voltage level)
delay(ms_cnt); // wait for a Millisecond
digitalWrite(D4, LOW); // turn the LED off by making the voltage LOW
digitalWrite(D5, HIGH); // turn the LED on (HIGH is the voltage level)
delay(ms_cnt); // wait for a Millisecond
digitalWrite(D5, LOW); // turn the LED off by making the voltage LOW
digitalWrite(D6, HIGH); // turn the LED on (HIGH is the voltage level)
delay(ms_cnt); // wait for a Millisecond
digitalWrite(D6, LOW); // turn the LED off by making the voltage LOW
//White LED light than any other color lights, so reducing the brightness
for(i=0;i< ms_cnt/6;i++)
{
digitalWrite(D11, HIGH);
delay(1);
digitalWrite(D11, LOW);
delay(5);
}
digitalWrite(D12, HIGH);
delay(ms_cnt);
digitalWrite(D12, LOW);
digitalWrite(D13, HIGH);
delay(ms_cnt);
digitalWrite(D13, LOW);
digitalWrite(D14, HIGH);
delay(ms_cnt);
digitalWrite(D14, LOW);
digitalWrite(D15, HIGH);
delay(ms_cnt);
digitalWrite(D15, LOW);
digitalWrite(D16, HIGH);
delay(ms_cnt);
digitalWrite(D16, LOW);
}
'3) Actuator > LED' 카테고리의 다른 글
12V 360 Degree 5050 SMD Red (SMD5050) [D045] (0) | 2016.09.21 |
---|---|
SMD5730 E27 24LED 30W Warm White (SMD5730) [D052] (0) | 2016.09.21 |
3LED 5050 SMD Module Pure Warm White (SMD5050) [D061] (0) | 2016.09.19 |
White LED Backlight Module [D068] (0) | 2016.09.19 |
LED G4 Lamp Bulb ACDC12V 2W AC220V Warm White [D060] (0) | 2016.09.19 |