void setup() {
pinMode(23, OUTPUT);
pinMode(22, OUTPUT);
pinMode(21, OUTPUT);
pinMode(19, OUTPUT);
pinMode(18, OUTPUT);
pinMode(5, OUTPUT);
pinMode(4, OUTPUT);
pinMode(2, OUTPUT);
}
void loop() {
for(int i=23;i>=2;i--){
if(i==20)i--;
if(i==17)i=i-12;
if(i==3)i--;
digitalWrite(i,HIGH);
delay(1000);
digitalWrite(i,LOW);
}
for(int i=2;i<=23;i++){
if(i==20)i++;
if(i==6)i=i+12;
if(i==3)i++;
digitalWrite(i,HIGH);
delay(1000);
digitalWrite(i,LOW);
}
}