const int dataPinSR1 = 8;
const int latchPinSR1 = 10;
const int clockPinSR1 = 12;
const int dataPinSR2 = 9;
const int latchPinSR2 = 11;
void setup() {
pinMode(dataPinSR1, OUTPUT);
pinMode(latchPinSR1, OUTPUT);
pinMode(clockPinSR1, OUTPUT);
pinMode(dataPinSR2, OUTPUT);
pinMode(latchPinSR2, OUTPUT);
}
void loop() {
byte dataForSR1 = B10101010;
byte dataForSR2 = B01010101;
digitalWrite(latchPinSR1, LOW);
digitalWrite(latchPinSR2, LOW);
shiftOut(dataPinSR1, clockPinSR1, MSBFIRST, dataForSR1);
shiftOut(dataPinSR2, clockPinSR1, MSBFIRST, dataForSR2);
digitalWrite(latchPinSR1, HIGH);
digitalWrite(latchPinSR2, HIGH);
delay(500);
}