const int data=8;
const int latch=10;
const int clock=11;
//random numbers 0B00000011. sending (00000011) this data to shift register (0B) define binary value
int dataArray[10]={0B00000011,0B10011111,0B00100101,0B11111101,0B10011001,0B01001001,
0B01000001,0B00011111,0B00000001,0B00001001
};
void setup() {
pinMode(data,OUTPUT);
pinMode(latch,OUTPUT);
pinMode(clock,OUTPUT);
}
void loop() {
for(int i=0;i<9;i++)
{
digitalWrite(latch,LOW);
shiftOut(data,clock,MSBFIRST,dataArray[i]);
digitalWrite(latch,HIGH);
delay(1000);
}
}