shifter register

Nothing jumps out as a problem.

Does it help if you set latchpin HIGH in setup()?

It might be worth operating the hardware side without the arduino attached -- jumper the latch pin low and the data pin high and wiggle the clock line by jumpering it to ground and +5 alternately…

-br