Added a command queue to the firmware code for more accurate timing of pin commands