void setup() {
  // put your setup code here, to run once:
  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() {
  // put your main code here, to run repeatedly:
  for(int i=1;i<11;i++) {
    switch(i)
    {
      case 1:digitalWrite(UR, HIGH);
        digitalWrite(LR, HIGH);
        delay(400);

        break;
      case 2:digitalWrite(U, HIGH);
        digitalWrite(UR, HIGH);
        digitalWrite(M, HIGH);
        digitalWrite(LL, HIGH);
        digitalWrite(L, HIGH);
        delay(500);
        break;
      case 3:digitalWrite(U, HIGH);
        digitalWrite(UR, HIGH);
        digitalWrite(M, HIGH);
        digitalWrite(LR, HIGH);
        digitalWrite(L, HIGH);
        delay(500);
        break;
      case 4:digitalWrite(UL, HIGH);
        digitalWrite(UR, HIGH);
        digitalWrite(M, HIGH);
        digitalWrite(LR, HIGH);
        delay(500);
        break;
      case 5:digitalWrite(U, HIGH);
        digitalWrite(UL, HIGH);
        digitalWrite(M, HIGH);
        digitalWrite(LR, HIGH);
        digitalWrite(L, HIGH);
        delay(500);
        break;
      case 6:digitalWrite(U, HIGH);
        digitalWrite(UL, HIGH);
        digitalWrite(M, HIGH);
        digitalWrite(LL, HIGH);
        digitalWrite(LR, HIGH);
        digitalWrite(L, HIGH);
        delay(500);
        break;
      case 7:digitalWrite(U, HIGH);
        digitalWrite(UR, HIGH);
        digitalWrite(LR, HIGH);
        delay(500);
        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);
        break;
      case 9:digitalWrite(U, HIGH);
        digitalWrite(UL, HIGH);
        digitalWrite(UR, HIGH);
        digitalWrite(M, HIGH);
        digitalWrite(LR, HIGH);
        delay(500);
        break;
      case 10:digitalWrite(U, HIGH);
        digitalWrite(UL, HIGH);
        digitalWrite(UR, HIGH);
        digitalWrite(LL, HIGH);
        digitalWrite(LR, HIGH);
        digitalWrite(L, HIGH);
        delay(500);
        break;
    }
    digitalWrite(U, LOW);
    digitalWrite(UL, LOW);
    digitalWrite(UR, LOW);
    digitalWrite(M, LOW);
    digitalWrite(LL, LOW);
    digitalWrite(LR, LOW);
    digitalWrite(L, LOW);
    delay(200);
  }
}