3 4021b daisy chained

Hi im new to the forum and the arduino platform. My project is to take 12 spdt on-off-on microswitches into 3 4021 shift registers into the mega adk board and output to optocouplers with no registers on the output side for now. i have all the hardware completed and have hit a wall on the programming side. Any help would sure be appreciated. For interests sake, this is the switch panel that controlls my 9' tall 12 motor knex crane.