examples/TinyGPS/README.md
This project shows how to use Serial Studio to visualize GPS location data from a GPS module (GY-NEO6MV2) connected to an Arduino. The Arduino reads GPS data (latitude, longitude, altitude) and sends it to Serial Studio over serial for display on a map.
Compatibility. Works with any GPS module that outputs NMEA sentences at 9600 baud. The sketch ships configured for an Uno or Nano; switching to a Mega 2560 (or any board with a spare hardware serial port) is a two-line change in the sketch.
You need a GY-NEO6MV2 GPS module and an Arduino. As shipped, the sketch reads the GPS through SoftwareSerial on an Uno or Nano: connect the TX pin of the GPS module to Arduino pin 2 (the sketch's software-serial RX pin). The GPS module must run at 9600 baud, which matches the default in the Arduino sketch.
On a Mega 2560 (or any board with a spare hardware serial port), use Serial1 instead: connect the GPS module's TX pin to the Mega's RX1 pin and swap these two lines in the sketch, uncommenting the first and removing the second:
//HardwareSerial &gpsSerial = Serial1;
SoftwareSerial gpsSerial(2, 3); // For Arduino UNO/Nano
TinyGPS.ino)Install the TinyGPS library:
Once installed, open TinyGPS.ino, wire the GPS module per the hardware setup, and upload. The GPS data is transmitted with these delimiters:
$). Marks the start of a frame.;). Marks the end of the frame.,). Separates fields (latitude, longitude, altitude).The frame looks like:
$latitude,longitude,altitude;
Serial Studio needs to be configured to parse the GPS data:
TinyGPS.ssproj. Launch Serial Studio and load the TinyGPS.ssproj file from this project in the Project Editor. It has everything you need to interpret the Arduino's data.If you want to configure it yourself:
$.;.,.Then click the Map button in Serial Studio to create a GPS map widget automatically. The widget uses the latitude and longitude to show the current position, and altitude is logged into the CSV.
To get the most out of the mapping features, you may need API keys for some map styles:
Once Serial Studio is configured:
TinyGPS.ssproj configures a UART source at 115200 baud (matching the Arduino sketch). Pick the Arduino's serial port and connect.$), end sequence (;), and separator (,) are set correctly in the project settings.