serial communication

master
ademant 2019-08-02 20:37:53 +02:00
parent 83f6a3e526
commit ad219072ca
1 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ def sensor_wake():
'\x05', #checksum
'\xab'] #tail
for b in bytes:
ser.write(b)
ser.write(b.encode())
# xAA, 0xB4, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x05, 0xAB
@ -148,7 +148,7 @@ def sensor_sleep():
'\x05', #checksum
'\xab'] #tail
for b in bytes:
ser.write(b)
ser.write(b.encode())
def main(args):