From 86e8ccf8417cd5060cb889e881cb0c76e5314fdf Mon Sep 17 00:00:00 2001 From: Furrtek Date: Mon, 10 Jun 2019 22:37:06 +0100 Subject: [PATCH] Serial for Python3 doesn't like writing strings --- tx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tx.py b/tx.py index 9739f14..45df281 100644 --- a/tx.py +++ b/tx.py @@ -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()