serial module
Ron Eggler
ronDOTeggler at tscheemail.com
Fri May 18 17:53:21 EDT 2012
Hoi,
I'm trying to connect to a serial port and always get the error
"serial.serialutil.SerialException: Port is already open." whcih is untrue.
I have no serial port open yet, my code looks like this:
#!/usr/bin/python
import time
import serial
# configure the serial connections (the parameters differs on the device
# you are connecting to)
ser = serial.Serial(
port='/dev/ttyUSB0',
baudrate=19200,
parity=serial.PARITY_ODD,
stopbits=serial.STOPBITS_TWO,
bytesize=serial.SEVENBITS
)
ser.open()
Why do I get this error?
Thank you,
Ron
--- Posted via news://freenews.netfront.net/ - Complaints to news at netfront.net ---
More information about the Python-list
mailing list