From 87bd807c26d95825354be87bd21246e2d9fadc56 Mon Sep 17 00:00:00 2001 From: askiiart Date: Tue, 25 Oct 2022 21:17:40 -0500 Subject: [PATCH] Clean it up --- Python/tx_speed.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Python/tx_speed.py b/Python/tx_speed.py index b0b82fd..4090a10 100644 --- a/Python/tx_speed.py +++ b/Python/tx_speed.py @@ -12,14 +12,13 @@ try: # Then, just remove "/dev/", and the number, from the port, and type it into the variable `port` # --- - arduino_connected = False port = 'ttyACM' - while not arduino_connected: + while True: ports = getoutput(f'ls /dev | grep {port}').split('\n') if ports != ['']: ports.sort() port = ports[len(ports) - 1] - arduino_connected = True + break link = txfer.SerialTransfer(port, 115200, timeout=.1)