openauto_raspberry/readingData/gpstest.py

10 lines
166 B
Python
Raw Permalink Normal View History

2017-10-29 17:59:14 +00:00
import serial
gps = serial.Serial("/dev/ttyACM0", baudrate = 9600)
while True:
line = gps.readline()
data = line.split(",")
if data[0] == "$GPRMC":
print line