Create gpstest.py
This commit is contained in:
parent
d6ef8b1697
commit
afe5284c82
1 changed files with 9 additions and 0 deletions
9
readingData/gpstest.py
Normal file
9
readingData/gpstest.py
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import serial
|
||||
|
||||
gps = serial.Serial("/dev/ttyACM0", baudrate = 9600)
|
||||
|
||||
while True:
|
||||
line = gps.readline()
|
||||
data = line.split(",")
|
||||
if data[0] == "$GPRMC":
|
||||
print line
|
||||
Loading…
Reference in a new issue