From 0bb76864af10fc53331e00505dc734dba722ee92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Fri, 12 Aug 2022 02:25:49 +0200 Subject: [PATCH] undo to decode mehode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- pc-client/main.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pc-client/main.py b/pc-client/main.py index c3f7e40..9ac30d1 100644 --- a/pc-client/main.py +++ b/pc-client/main.py @@ -15,9 +15,7 @@ host = serial.Serial('COM3', 9600) while True: try: - output = str(host.readline()) - output = output.replace("b'", "") - output = output.replace(str("\r\n'"), "") - print(output) + output = host.readline() + print(output.decode("ASCII")) except KeyboardInterrupt: - exit() \ No newline at end of file + break \ No newline at end of file