Product Overview

1/29/2018 ESP32 Thing Motion Shield Hookup Guide - learn.sparkfun.com
https://learn.sparkfun.com/tutorials/esp32-thing-motion-shield-hookup-guide?_ga=2.240586115.1022152466.1517244327-204410570.1509632255 15/17
(left) Connection to the GP-20U7. (right) Connection to the GP-735.
As for the hardware, either plug in the recommend 3-wire GPS module (rx only), or wire in a 4-wire module (that can
be run from 3.3V) to the provided pin header.
The data that the GPS will emit comes in the form of NMEA messages. See the NMEA Reference Manual (PDF) for
information on decoding.
Logging a Journey
Putting all the concepts from this hookup guide together, a data logger can be built that saves IMU and GPS data. For
your consideration, a simple example exists in the software folder of the Motion Shield’s GitHub repository.
ESP32_MOTION_SHIELD / SOFTWARE / GPS_IMU_SD_LOGGER
The program collects the GPS data as strings of NMEA data, and the IMU data as CSV. It uses the FileSerial library
to create two sets of files, one for GPS data and one for IMU data. What to do with the data is up to you, but let’s take
a look at the GPS data and graph it.
This is what the GPS NMEA messages look like:
Example NMEA data
The data is given to a tool such as the GPS Visualizer, which can create various types of data. Outputting as GPX
format, the data can be passed to a map web application.
Example GPX data
And finally, the GPS track can be viewed.
//Pass usb data to the gps
if (Serial.available())
{
Serial1.write(Serial.read());
}
//Pass gps data to the usb