void setup() {
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
}
int U=1;
int UR=2;
int LR=3;
int L=4;
int LL=5;
int UL=6;
int M=7;
void loop() {
for(int i=1;i<11;i++){
switch(i)
{
case 1:digitalWrite(UR, HIGH);
digitalWrite(LR, HIGH);
delay(400);
digitalWrite(UR, LOW);
digitalWrite(LR, LOW);
break;
case 2:digitalWrite(U, HIGH);
digitalWrite(UR, HIGH);
digitalWrite(M, HIGH);
digitalWrite(LL, HIGH);
digitalWrite(L, HIGH);
delay(500);
digitalWrite(U, LOW);
digitalWrite(M, LOW);
digitalWrite(LL, LOW);
digitalWrite(L, LOW);
break;
case 3:digitalWrite(U, HIGH);
digitalWrite(UR, HIGH);
digitalWrite(M, HIGH);
digitalWrite(LR, HIGH);
digitalWrite(L, HIGH);
delay(500);
digitalWrite(U, LOW);
digitalWrite(M, LOW);
digitalWrite(LR, LOW);
digitalWrite(L, LOW);
break;
case 4:digitalWrite(UL, HIGH);
digitalWrite(UR, HIGH);
digitalWrite(M, HIGH);
digitalWrite(LR, HIGH);
delay(500);
digitalWrite(UL, LOW);
digitalWrite(UR, LOW);
digitalWrite(M, LOW);
digitalWrite(LR, LOW);
break;
case 5:digitalWrite(U, HIGH);
digitalWrite(UL, HIGH);
digitalWrite(M, HIGH);
digitalWrite(LR, HIGH);
digitalWrite(L, HIGH);
delay(500);
digitalWrite(U, LOW);
digitalWrite(UL, LOW);
digitalWrite(M, LOW);
digitalWrite(LL, LOW);
digitalWrite(LR, LOW);
digitalWrite(L, LOW);
break;
case 6:digitalWrite(U, HIGH);
digitalWrite(UL, HIGH);
digitalWrite(M, HIGH);
digitalWrite(LL, HIGH);
digitalWrite(LR, HIGH);
digitalWrite(L, HIGH);
delay(500);
digitalWrite(U, LOW);
digitalWrite(UL, LOW);
digitalWrite(M, LOW);
digitalWrite(LL, LOW);
digitalWrite(LR, LOW);
digitalWrite(L, LOW);
break;
case 7:digitalWrite(U, HIGH);
digitalWrite(UR, HIGH);
digitalWrite(LR, HIGH);
delay(500);
digitalWrite(U, LOW);
digitalWrite(UR, LOW);
digitalWrite(LR, LOW);
break;
case 8:digitalWrite(U, HIGH);
digitalWrite(UL, HIGH);
digitalWrite(UR, HIGH);
digitalWrite(M, HIGH);
digitalWrite(LL, HIGH);
digitalWrite(LR, HIGH);
digitalWrite(L, HIGH);
delay(500);
digitalWrite(U, LOW);
digitalWrite(UL, LOW);
digitalWrite(UR, LOW);
digitalWrite(M, LOW);
digitalWrite(LL, LOW);
digitalWrite(LR, LOW);
digitalWrite(L, LOW);
break;
case 9:digitalWrite(U, HIGH);
digitalWrite(UL, HIGH);
digitalWrite(UR, HIGH);
digitalWrite(M, HIGH);
digitalWrite(LR, HIGH);
delay(500);
digitalWrite(U, LOW);
digitalWrite(UL, LOW);
digitalWrite(UR, LOW);
digitalWrite(M, LOW);
digitalWrite(LR, LOW);
break;
case 10:digitalWrite(U, HIGH);
digitalWrite(UL, HIGH);
digitalWrite(UR, HIGH);
digitalWrite(LL, HIGH);
digitalWrite(LR, HIGH);
digitalWrite(L, HIGH);
delay(500);
digitalWrite(U, LOW);
digitalWrite(UL, LOW);
digitalWrite(UR, LOW);
digitalWrite(LL, LOW);
digitalWrite(LR, LOW);
digitalWrite(L, LOW);
break;
}
delay(200);
}
}