The Sample Code:
http://www.kevindarrah.com/wp-content/uploads/2015/02/74HC165.zip
Datasheet for the 74HC165:
http://www.nxp.com/documents/data_sheet/74HC_HCT165.pdf
My tutorial on the 74HC595 to control a ton of outputs:
http://youtu.be/6fVbJbNPrEU
Check out my Tindie store (trigBoard is available) https://www.tindie.com/stores/kdcircuits/
Thanks to all the Patrons for dropping a few bucks in the tip jar to help make these videos happen!
https://www.patreon.com/kdarrah
Twitter: https://twitter.com/KDcircuits
For inquiries or design services:
https://www.kdcircuits.com