Hook up diagram for components

The circuit is perfect for what I need, and I've been kindly given the code for the project,

Have you posted either?
They're interrelated, so difficult to provide the one without seeing the other.
I'm guessing charlieplexing.