char digit[] = {0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0xFF, 0xEF, 0x00};
char pin[] = {9, 10, 2, 3, 4, 8, 7, 11};


void setup() {
  for (int x = 0; x < 8; x++) {
    pinMode(pin[x], OUTPUT);
  }
  Serial.begin(115200);
}

void loop() {
  static int y = 0;
  int i = digit[y];
  int m = sizeof(digit) / sizeof(digit[0]); // št. elementov seznama
  for (int x = 0; x < 8; x++) {
    int temp = i & 0x01; // filter ki vazame samo prvi bit
    digitalWrite(pin[x], temp);
    i = i >> 1; // prestavi bit za eno v desno
    //delay(500);
  }
  y++;

  // Serial.println(m);

  if (y > m-1) y = 0;
  delay(700);
}