Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Exercise 9: GPS receiverIntroduction | ||||||||
Changed: | ||||||||
< < | 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. | |||||||
> > | 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 | ||||||||
Line: 11 to 11 | ||||||||
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 | ||||||||
Changed: | ||||||||
< < | Download https://github.com/inmcm/micropyGPS and install micropyGPS.py in /lib on the ESP32 file system. Have a look at test_micropyGPS.py to understand how to use the parser. | |||||||
> > | Download https://github.com/inmcm/micropyGPS and install micropyGPS.py in /lib on the ESP32 file system. Have a look at test_micropyGPS.py to understand how to use the parser. Run it on the PC. | |||||||
Exercise 3: Interpreting real messages | ||||||||
Changed: | ||||||||
< < | First save a series of NMEA sentences on a file. Transfer the file to the PC and have them interpreted by the micropyGPS parser. | |||||||
> > | 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. | |||||||
Changed: | ||||||||
< < | You should get something similar to this:
Modify the program from exercise 1 and send received messages to the micropyGPS parser. Extract the following information:
| |||||||
> > | https://iotworkshop.africa/pub/IoT_Course_English/GPSAndInterfaceThroughUART/parserLog.txt | |||||||
Exercise 4: as_GPSPeter 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. | ||||||||
Line: 39 to 30 | ||||||||
| ||||||||
Added: | ||||||||
> > |
|
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
Exercise 9: GPS receiverIntroductionMost 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 messagesWrite 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 micropyGPSDownload https://github.com/inmcm/micropyGPS and install micropyGPS.py in /lib on the ESP32 file system. Have a look at test_micropyGPS.py to understand how to use the parser.Exercise 3: Interpreting real messagesFirst save a series of NMEA sentences on a file. Transfer the file to the PC and have them interpreted by the micropyGPS parser. You should get something similar to this: Modify the program from exercise 1 and send received messages to the micropyGPS parser. Extract the following information:
Exercise 4: as_GPSPeter 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 -- Uli Raich - 2020-08-04Comments
|