September 2016
Intermediate to advanced
495 pages
9h 37m
English
Now that we have the location part working correctly, we can start building our GPS tracking projects for secret agents. The first project will simply use the location and send it via SMS to the phone number of your choice.
As the sketch is quite similar to previous one, I'll only show which parts changed compared to the location test sketch. We first need to define the phone number where you want to send the tracking data to:
char * sendToNumber = "123456789";
After getting the location just as in the previous section, we can now build the message that we will send via SMS:
char messageToSend[140]; String message = "Current GPS location: " + latitude + "," + longitude; message.toCharArray(messageToSend, message.length()); ...
Read now
Unlock full access