roam-qgis / Roam

Simple data collection built using QGIS.
http://roam-docs.readthedocs.org/en/latest/
GNU General Public License v2.0
171 stars 61 forks source link

GPS debug #449

Closed NathanW2 closed 4 years ago

NathanW2 commented 5 years ago
from PyQt5.QtSerialPort import QSerialPort
from PyQt5.QtCore import QIODevice

ser = QSerialPort("COM4")
ser.setBaudRate(9600)
ser.setFlowControl(QSerialPort.NoFlowControl)
ser.setParity(QSerialPort.NoParity)
ser.setDataBits(QSerialPort.Data8)
ser.setStopBits(QSerialPort.OneStop)

opened = ser.Open(QIODevice.ReadOnly)
print(opened)
for i in range(2000):
     print(ser.read(100))