I’m overwhelmed to take you through a tour of how a GPS shield is interfaced to Arduino UNO so as to print the values of latitude and longitude. It can be done by following these simple steps.
GPS shield niche view:
- GPS shield.
- Arduino UNO. You can buy this also from our Store by clicking here.
- New version of Arduino IDE – (Download it from here )
- TinyGPS library download.This library can be downloaded by clicking here .
Just, follow my lead carefully:
Step 1:Download and install the latest version of Arduino IDE.
Step 2:Download and extract files of TinyGPS library.
Step 3:Go to library folder files of arduino. (For example:In Windows OS if arduino is installed in Disk C -Go to Program Files>Arduino>libraries) .Copy and paste extracted files of TinyGPS library into libraries.
Step 4: GPS shield can work in H/W or S/W. If H/W mode is selected (0,1) pins is set as (Rx,Tx) by default. There is no SoftwareSerial declaration for H/W mode.
Step 5: Open File>Examples>Examples from custom libraries>simple_test in Arduino IDE.
Step 6:In this program, in SoftwareSerial declaration change pin numbers to 2,3 (Rx,Tx) from 4,3(Rx,Tx). Also, other set of SoftwareSerial pins can be 8,9 which can be set in program as well.
Step 7:Hardware changes involve switching S1 pin from H/W to S/W. If 2,3 is selected as SoftWareSerial pins then Jumpershort is placed on D2 of rxd and D3 of txd. Else, it can be placed on the combination D8 and D9 depending on which pin is selected for program.
Step 8:Compile and upload sketch to Arduino UNO. Place GPS shield over it.
Step 9: Place your GPS wire antenna outside so that it can start locating your co-ordinates once when the status LED (TM) starts blinking .
Step 10:Latitude and longitude can be directly obtained using this code if you open serial monitor.
Follow these ten steps, your co-ordinates can be easily tracked.