const int dataPin1 = 2; /* DS */
const int clockPin1 = 3; /* SHCP */
const int latchPin1 = 4; /* STCP */
int pattern1;
int pattern2;
void setup() {
for(int i = 2; i<4; i++)
{
pinMode(i, OUTPUT);
}
pattern1 = 0b01100000;
pattern2 = 0b11111110;
digitalWrite(latchPin1, LOW);
shiftOut(dataPin1, clockPin1, LSBFIRST, pattern2);
shiftOut(dataPin1, clockPin1, LSBFIRST, pattern1);
digitalWrite(latchPin1, HIGH);
delay(2500);
digitalWrite(latchPin1, LOW);
shiftOut(dataPin1, clockPin1, LSBFIRST, pattern1);
shiftOut(dataPin1, clockPin1, LSBFIRST, pattern2);
digitalWrite(latchPin1, HIGH);
delay(10);
}
void loop() {
//pattern = ~pattern; // Invert the pattern
}