need help to blink simple pattern with shift register

Grumpy_Mike:
You will need two arrays instead of just one, one to hold the pattern like you have now, and one to hold the current state of the LEDs.

for(int i = 0; i<8; i++){

if(led[i] == 1) ledState[i] ^= 1; // this will blink all the LEDs in the pattern
}
delay(300); // so you can see it.



And then send the ledState array out to the shift registers.

See how you have to be very careful when you specify something because woolly talk can be misinterpreted.

Sir,

I tried to add blink code at diffrent positions but no success. Can you upload the whole code from starting to end point. i am unable to achieve this. Please correct my whole code.

int latchPin = 5;
int ClockPin = 6;
int dataPin = 4;

int led[8] = {0,1,1,0,0,1,1,0};
int ledState[8];
void setup() 

    {
      pinMode(latchPin,OUTPUT);             
      pinMode(ClockPin, OUTPUT);
      pinMode(dataPin, OUTPUT);
    }

void loop() {

 digitalWrite(latchPin, LOW);
    for(int i = 0; i<8; i++)
    {
      if(led[i] == 1) ledState[i] ^= 1; 
    }
      delay(300);
      for(int i=0;i<8;i++)
      {
        digitalWrite(ClockPin,LOW);
        digitalWrite(dataPin,led[i]);
        digitalWrite(ClockPin,HIGH);
     }      
      digitalWrite(latchPin, HIGH);    
}