Zöld LED modulkártya Arduinohoz
- Arduino fejlesztőkörnyezethez
- 6 digitális zöld közös katódos LED (Magas világítással)
- Üzemi
feszültség : DC 3-12V
- Méret 17.8mm*11.43mm
- 1K ohm határoló ellenállás
- Példa program csatolva
- 1db panelt tartalmaz a csomag
- A képen szereplő nyomógomb modul külön megvásárolható a webáruházban (
termék kódja EM-044)
Arduiuo uno/mega2560 Code 1pcs
//******************************************************//
/*
Arduiuo_6led
This example code is in the public domain.
*/
// give it a name:
int D1 = 13;
int D2 = 12;
int D3 = 11;
int D4 = 10;
int D5 = 9;
int D6 = 8;
// the setup routine runs once when you
press reset:
void setup() {
// initialize the digital pin as an
output.
pinMode(D1, OUTPUT);
pinMode(D2, OUTPUT);
pinMode(D3, OUTPUT);
pinMode(D4, OUTPUT);
pinMode(D5, OUTPUT);
pinMode(D6, OUTPUT);
}
// the loop routine runs over and over
again forever:
void loop() {
digitalWrite(D1, HIGH); // turn the
LED on (HIGH is the voltage level)
delay(200);
// wait for a 200 Millisecond
digitalWrite(D1, LOW); //
turn the LED off by making the voltage LOW
digitalWrite(D2, HIGH); // turn the
LED on (HIGH is the voltage level)
delay(200);
// 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(200);
// 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(200);
// 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(200);
// 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(200);
// wait for a Millisecond
digitalWrite(D6, LOW); //
turn the LED off by making the voltage LOW
}
//******************************************************//