Issues with PySerial: Port must be configured before it can be used
问题 I am writing code (in python) to use serial communication with an Arduino, using the pySerial library, on Windows 7. However, I am having issues using the ports correctly. Here is my code: import serial #sets the connection parameters, relook at when know more ser = serial.Serial( port ='COM4', baudrate = 9600, parity = serial.PARITY_ODD, stopbits = serial.STOPBITS_TWO, bytesize = serial.EIGHTBITS ) ser = serial.Serial() ser.open() #opens port ser.isOpen() #returns true? handStateList = [0]*3