Instructions
www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
int BASE = 2 ; // The I/O pin for the first LED
int NUM = 6; // Amount of LEDs
void setup() {
for (int i = BASE; i < (BASE + NUM); i ++) {
pinMode(i, OUTPUT); // Set I/O pins as output
}
}
void loop() {
for (int i = BASE; i < (BASE + NUM); i ++){
digitalWrite(i, LOW); // Sets I/O pins to "low"
// switches on the LEDs one after the other
delay(200); // delay
}
for (int i = BASE; i < (BASE + NUM); i ++) {
digitalWrite(i, HIGH); // Sets I/O pins to "high"
// switches off the LEDs one after the other
delay(200); // delay
}
}