const int dataPin1 = 2;   /* DS */
const int clockPin1 = 3;  /* SHCP */
const int latchPin1 = 4;  /* STCP */
//const int dataPin2 = 5;   /* DS */
//const int clockPin2 = 6;  /* SHCP */
const int latchPin2 = 7;  /* STCP */

int pattern1;
int pattern2;

void setup() {
  for(int i = 2; i<8; i++)
   {
      pinMode(i, OUTPUT);
   }

 pattern1 = 0b01100000; //1
 pattern2 = 0b11011010; //2

  digitalWrite(latchPin1, LOW);
  shiftOut(dataPin1, clockPin1, LSBFIRST, pattern2); //2 to SSD1
  digitalWrite(latchPin1, HIGH);
  delay(1500);
  digitalWrite(latchPin2, LOW);
  shiftOut(dataPin1, clockPin1, LSBFIRST, pattern1); // 1 to SSD2
  digitalWrite(latchPin2, HIGH);
  delay(1500);

  digitalWrite(latchPin1, LOW);
  shiftOut(dataPin1, clockPin1, LSBFIRST, 0b11110010);// 3 to SSD1
  digitalWrite(latchPin1, HIGH);
  delay(1500);
  digitalWrite(latchPin2, LOW);
  shiftOut(dataPin1, clockPin1, LSBFIRST, 0b10110110);// 5 to SSD2
  digitalWrite(latchPin2, HIGH);

}


void loop() {
  
  //pattern = ~pattern; // Invert the pattern
}
74HC595
74HC595