[PyQt] Basic serial question

Phil phil_lor at bigpond.com
Sun Sep 24 02:21:55 BST 2017


Thank you for reading this.

Using Eric, I'm trying to take text from an edit box and then transmit 
it via a serial port. The following console code proves that the serial 
data is being received correctly.

import serial

ser = serial.Serial('/dev/ttyACM0',9600)
ser.write(b'Fred\n')

To create an Eric GUI, the way I understand a QT C++ example, is that I 
have to import QSerialPort. The problem is that the Eric error message 
says that there isn't a QSerialPort or QtSerialPort module. I have 
installed python3-pyqt5.qtserialport.

The GUI was created under Eric without too many problems but I'm 
wondering if I need to install any other pyqt4 files to move forward 
with serial transmission?

-- 
Regards,
Phil


More information about the PyQt mailing list