I have been trying to make serial work with Python and Pi3, however so far I have been unsuccessful.
When running the Python script, I am getting an error "serial.serialutil.SerialException: Port is already open."
I have already tried all tips in another post that should solve issues with Pi3 and the Bluetooth port. (How do I make serial work on the Raspberry Pi3)
My python script is the following:
import serial ser = serial.Serial('/dev/serial0', 9600, timeout=1) ser.open() ser.write("testing") try: while 1: response = ser.readline() print response except KeyboardInterrupt: ser.close()