program which handles all commands sent from pc to arduino, as well as processing any responses from the embedded arduino