Added a restartComms var, used for reconnecting the device if it fails
Updated