// Define the latch, clock, and data pins
#define LATCH_PIN 4
#define CLOCK_PIN 12
#define DATA_PIN 14
// Initialize the shift register
ShiftRegister74HC595<3> sr (LATCH_PIN, CLOCK_PIN, DATA_PIN);
void setup() {
// Set all pins on the shift register to OUTPUT
sr.setAllLow();
}
void loop() {
// Example: Turn on the first LED on the first shift register
sr.set(0, HIGH);
delay(500);
// Turn off the first LED on the first shift register
sr.set(0, LOW);
delay(500);
}