User Manual

168
/
223
Bit' (LSB).
The last parameter is the actual data to be shifted into the shift register, which in
this case is 'leds'.
void updateShiftRegister()
{
digitalWrite(latchPin, LOW);
shiftOut(dataPin, clockPin, LSBFIRST, leds);
digitalWrite(latchPin, HIGH);
}
If you wanted to turn one of the LEDs off rather than on, you would call a similar
Arduino function (bitClear) with the 'leds' variable. This will set that bit of 'leds' to
be 0 and you would then just need to follow it with a call to 'updateShiftRegister' to
update the actual LEDs.
Example picture