char incomingByte;
int dataPin = 2;
int latchPin = 3;
int clockPin = 4;
void setup() {
pinMode(dataPin, OUTPUT);
pinMode(latchPin, OUTPUT);
pinMode(clockPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
if (Serial.available() > 1) {
byte a = Serial.parseInt();
byte b = Serial.parseInt();
digitalWrite(latchPin, LOW); //Pull latch LOW to start sending data
shiftOut(dataPin, clockPin, MSBFIRST, b); //Send the data
digitalWrite(latchPin, HIGH); //Pull latch HIGH to stop sending data
delay(10);
}
}