Reading serial input and printing to Tkinter GUI
问题 I'm trying to make a Tkinter based GUI for an Arduino printing sensors value and responding to user input. The code I'm trying to use to eliminate while loops is this, which doesn't print any sensor information, the only output is "Trying.../dev/ttyACM0" followed by the tkinter window opening. import serial import time from Tkinter import * connected = False write_to_file_path = "output.txt" output_file = open(write_to_file_path, "w+") locations=['/dev/ttyACM0','/dev/ttyACM1','/dev/ttyACM2','