def sendToDevice(self, command):
    if self.debug:
        print(('Sending: ' + command))
    self.ser.write((command + '\n').encode())
def sendToDevice(self, command):
    if self.debug:
        print(('Sending: ' + command))
    self.ser.write((command + '\n').encode())