Attempt at Firmware Code

The 1st block comment is my attempt at Spark Code

2nd block is the logic in pseudo-java that's trying to incorporate the
damn pins.