esperar si ningún arduino responde
no afecta el buen funcionamiento, pero si los arduinos se desconectan, el lector hace un pico de uso de cpu.
This commit is contained in:
parent
a70d4734b7
commit
3717b24234
1 changed files with 7 additions and 6 deletions
|
@ -21,10 +21,11 @@ ser.write(serial.to_bytes(com))
|
||||||
ser.flush()
|
ser.flush()
|
||||||
while True:
|
while True:
|
||||||
if ser.in_waiting > 0:
|
if ser.in_waiting > 0:
|
||||||
line = ser.readline().decode('utf-8', errors='replace').rstrip()
|
line = ser.readline().decode('utf-8', errors='replace').rstrip()
|
||||||
#time.sleep(0.1)
|
print(line)
|
||||||
print(line)
|
ser.flush()
|
||||||
ser.flush()
|
break
|
||||||
break
|
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
quit()
|
quit()
|
||||||
|
|
Loading…
Reference in a new issue