void setup() {
// put your setup code here, to run once:
for (int pin= 2; pin <9; pin++) {
pinMode(pin,OUTPUT);
}
}
void loop() {
// put your main code here, to run repeatedly:
int a = 2;
int t1 =35;
int t2 = 1000;
if (a=1){
for (int i = 2; i<9;i++){
digitalWrite(i,HIGH);
delay(t1);
digitalWrite(i+1,HIGH);
delay(t1);
digitalWrite(i+2,HIGH);
delay(t1);
digitalWrite(i,LOW);
// delay(t1);
digitalWrite(i+1,LOW);
}
for (int i = 8; i>1;i--){
digitalWrite(i,HIGH);
delay(t1);
digitalWrite(i-1,HIGH);
delay(t1);
digitalWrite(i-2,HIGH);
delay(t1);
digitalWrite(i,LOW);
delay(t1);
digitalWrite(i-1,LOW);
}
}
}