added the arduino class and fixed bugs in connectionmanager class