-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
I had a few COM Port devices plugged in and the parse_plot_data.py selected the wrong one. I adjusted the code in parse_plot_data.py to include an option to select the COM port from the listed COM ports:
def select_port(port):
devices = []
port_selected = False
for i,p in enumerate(port):
print(i,p.device)
#device = p.device
devices.append(p.device)
while not port_selected:
selected_port = input('Please Enter Port Number')
try:
device = devices[int(selected_port)]
port_selected = True
except:
print(f'Error please enter an integer within range of 0 - {len(devices)}')
print("===")
print(f'{device} selected')
return(device)
# list
from serial.tools import list_ports
port = list(list_ports.comports())
print("available ports:")
device = select_port(port)```Metadata
Metadata
Assignees
Labels
No labels