added the main code runnning on the arduino
changed the order of printing the outputs
removed all unnecessary rc code to reduce the clustering in the code