#include <Arduino.h>
#include <ShiftRegister74HC595.h>
// https://github.com/Simsso/ShiftRegister74HC595
const int dataPin = 5; /* DS */
const int clockPin = 19; /* SHCP */
const int latchPin = 18; /* STCP */
ShiftRegister74HC595<16> sr(dataPin, clockPin, latchPin);
void setup()
{
}
void loop () {
for ( int x =0 ;x < 127 ; x ++ ){
sr.set(x, HIGH);
delay (100);
}
for ( int x =127 ;x >0; x --){
sr.set(x, LOW);
delay (100);
}
}