Building a GPS location tracker
It's now time to build the last project of this chapter: a real GPS location tracker. For this project, we'll get the location just as before, using the GPS if available, and the GPRS location otherwise.
However, here we are going to use the GPRS capabilities of the shield to send the latitude and longitude data to dweet.io, which is a service we have used before. Then, we'll plot this data in Google Maps, allowing you to follow your device in real time from anywhere in the world.
As the sketch is very similar to the ones in the previous sections, I'll only detail the most important parts of the sketch here.
You need to define a name for the thing that will contain the GPS location data:
String dweetThing = "mysecretgpstracker";
Then, after getting the current location, we prepare the data to be sent to dweet.io:
uint16_t statuscode; int16_t length; char url[80]; String request = "www.dweet.io/dweet/for/" + dweetThing + "?latitude=" + latitude + "&longitude...