read_nmea.py 208 B

1234567891011
  1. #!/usr/bin/python3
  2. import serial
  3. from pynmeagps import NMEAReader
  4. stream = serial.Serial('/dev/ttyAMA0', 38400, timeout=3)
  5. nmr = NMEAReader(stream)
  6. (raw_data, parsed_data) = nmr.read()
  7. print(parsed_data)