[PyQt] QSerialPort() basic read question
phil_lor at bigpond.com
Sun Nov 19 09:25:05 GMT 2017
Thank you for reading this.
I'm trying to read serial data, but so far without any success. The only
thing printed is a blank line or "data = ".
I have, however, been able to write data successfully so the port set up
This is how I've set up the port for both reading and writing:
self.serial = QSerialPort()
The following is most of what I've tried so far and includes bits that
I've converted from C++ examples:
print("DEBUG: serial received data: ",
data = self.serial.readAll();
print("data = ")
print("DEBUG: processing received serial data")
I've also tried the following:
data = self.serial.readAll()
print(:data = ")
This blocks the main window from displaying, so I might be on the wrong
Finally, cat /dev/ttyACM0 show that the data is being received.
Any help at all will be greatly appreciated.
More information about the PyQt