const int dataPin=8;
const int latchPin=10;
const int clockPin=11;

//random numbers 0B00000011. sending (00000011) this data to shift register (0B) define binary value
int dataArray[10] ={0B11111110,0B11111100,0B11111000,0B11110000,0B11100000,0B11000000,
0B10000000,0B00000000,0B11110000,0B00001111};

void setup() {
  pinMode(dataPin,OUTPUT);
  pinMode(latchPin,OUTPUT);
  pinMode(clockPin,OUTPUT);
}


void loop() {
  for(int index=0;index<10;index++)
  {
    digitalWrite(latchPin,LOW);
    shiftOut(dataPin,clockPin,LSBFIRST, dataArray[index]);
    digitalWrite(latchPin,HIGH);
    delay(1000);
  }
}
  
74HC595