Serial for Python3 doesn't like writing strings

This commit is contained in:
Furrtek
2019-06-10 22:37:06 +01:00
parent feccca7715
commit 86e8ccf841
+1 -1
View File
@@ -10,7 +10,7 @@ def search_esl_blaster():
comport = "COM" + str(n)
try:
ser = serial.Serial(comport, 57600, timeout = 1) # 1s timeout for read
ser.write('?')
ser.write(str.encode('?'))
ser.flush()
test = len(ser.read_until("ESLBlaster"))
ser.close()