Tags:
view all tags
---+ Exercise 9: GPS receiver ---++ Introduction Most GPS receivers use a simple serial interface for communication and provide their data in form of NMEA sentences to the host. See [[GPS receiver]] for more details. The goal of this exercise will therefore be to receive these messages over a !UART port and to interpret them. The GPS receiver may need quite some time to find satellites and to be ready to send valid messages. It will start blinking the red LED when this is the case. ---++ Exercise 1: Receiving messages Write a script that receives NMEA messages on ESP32 !UART2, where Tx is re-mapped to D2 or GPIO21. Read the messages and print them as they come in. ---++ Exercise 2: Interpreting the NMEA messages using micropyGPS Download https://github.com/inmcm/micropyGPS and install micropyGPS.py in /lib on the ESP32 file system. Have a look at <a href="https://github.com/inmcm/micropyGPS/blob/master/test_micropyGPS.py" title="test_micropyGPS.py">test_micropyGPS.py</a> to understand how to use the parser. Run it on the PC. ---++ Exercise 3: Interpreting real messages First save a series of NMEA sentences on a file. Transfer the file to the PC and have them interpreted by the micropyGPS parser in the same fashion as the test_micropyGPS.py does. You should get a result similar to this log. %ATTACHURL%/parserLog.txt ---++ Exercise 4: as_GPS Peter Hinch has written an asynchronous GPS driver with a parser based on micropyGPS. The driver is already installed in your !MicroPython binary. Use this driver to extract the information of exercise 3. The documentation of as_GPS cant be found at https://github.com/peterhinch/micropython-async/blob/master/v3/docs/GPS.md -- %USERSIG{UliRaich - 2020-08-04}% ---++ Comments %COMMENT%
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
png
gpsResults.png
r1
manage
56.5 K
2020-08-04 - 07:44
UliRaich
txt
parserLog.txt
r1
manage
261.1 K
2020-08-04 - 15:09
UliRaich
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r2 - 2020-08-04
-
UliRaich
Home
Site map
AFNOG web
Embedded_Systems web
IoT_Course_English web
IoT_Course_French web
Main web
Sandbox web
TWiki web
IoT_Course_English Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
P
View
Raw View
Print version
Find backlinks
History
More topic actions
Edit
Raw edit
Attach file or image
Edit topic preference settings
Set new parent
More topic actions
Account
Log In
Register User
Edit
Attach
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback