I`ve been working on this code on and off for the last few weeks. Finally got it running on breadboard a few hours ago thanks to my good friend who helped me point out my errors in the circuit. This may have some machining now as I have a case to build!

Part 1 at least: