The flushInput() command seems to break my serial connection and doesn't allow for further reads. I can set up a connection, read perfectly fine, but after a flushInput() command any further read statements return no data. The inWaiting() command also returns 0. In order to receive more data I have to power cycle my device and restart the connection.
I'm using Python version 2.7.2, pyserial version 2.6, and mac OS X version 10.6.8
At the moment I'm hooked up to an arduino Uno. I had this same problem hooked up to a rs422 - usb converter.
Here's the commands I use:
>>> import serial as sr
>>> ser = sr.Serial('/dev/tty.usbmodem621',9600)
It will continue to contain 0 data indefinitely.
Log in to post a comment.