-
Notifications
You must be signed in to change notification settings - Fork 227
GPS SENSOR
Thomas E. Horner edited this page Mar 12, 2019
·
4 revisions
This sensor is intended for get the geographic coordinates received from UART NMEA 0183 compatible GPS sensors. A NMEA 0183 parser is included in the sensor driver that listens for GPGGA NMEA sentence.
What | Comments | |
---|---|---|
Identifier | GPS | NMEA 0183 UART |
Interface | UAR | |
Provides | lon | longitude (degrees) |
lat | latitude (degrees) | |
sats | number of satellites | |
Properties | none |
gps = sensor.attach("GPS", uart.UART1, 9600, 8, uart.PARNONE, uart.STOP1)
while true do
lon = gps:read("lon")
lat = gps:read("lat")
sats = gps:read("sats")
print("lon: "..lon..", lat: "..lat..", sats: "..sats)
tmr.delayms(500)
end