Testing the location functions
Before we dive into the two exciting projects of this chapter, we'll first make a simple test using the FONA shield, and see whether it can actually locate our project on a map. The sketch will actually test whether the GPS location is working correctly.
If not, no worries: the sketch, and the other projects of this chapter, will automatically use GPRS location instead. It's less precise, but works quite well. This will be the case if you are testing this project inside, for example.
This is the complete code for this part:
// Libraries #include "Adafruit_FONA.h" #include <SoftwareSerial.h> // Pins #define FONA_RX 2 #define FONA_TX 3 #define FONA_RST 4 // Buffer char replybuffer[255]; // Instances SoftwareSerial fonaSS ...
Get Arduino: Building exciting LED based projects and espionage devices now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.