Sarah Anderson- Kit’s Lights
Sarah Anderson – Kit’s Lights
[youtube http://www.youtube.com/watch?v=O9aI8FnvWSI]
int ledPins[] = {13,12,11,10,9};
void setup() {
for (int index = 0; index =0; index--){
digitalWrite(ledPins[index],HIGH);
delay(delayTime);
digitalWrite(ledPins[index],LOW);
}
}
don't know why it only shows my setup, here is the rest:
void loop(){
kitLiteR();
kitLiteL();
}
void kitLiteR(){
int delayTime=100;
for (int index =0; index<=4; index++){
digitalWrite(ledPins[index],HIGH);
delay(delayTime);
digitalWrite(ledPins[index],LOW);
}
}
void kitLiteL(){
int delayTime=100;
for (int index =4; index>=0; index–){
digitalWrite(ledPins[index],HIGH);
delay(delayTime);
digitalWrite(ledPins[index],LOW);
}
}