Shashwat Raj
Published © GPL3+

How to make a Gps_Location_Finder with Arduino

In this project article, I will show you how to make a GPS location finder using the neo 6m GPS module.

IntermediateFull instructions provided10,629
How to make a Gps_Location_Finder with Arduino

Things used in this project

Hardware components

Arduino Nano R3
Arduino Nano R3
×1
TinyShield GPS
TinyCircuits TinyShield GPS
×1
Standard LCD - 16x2 White on Blue
Adafruit Standard LCD - 16x2 White on Blue
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE
Arduino Softwareserial Library
Arduino Tinygps Library

Hand tools and fabrication machines

Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires

Story

Read more

Schematics

Circuit Diagram

Use this circuit diagram for making this project.

Code

Arduino Code

Arduino
Upload this code into your Arduino board.
#include <LiquidCrystal.h>
#include <SoftwareSerial.h>
#include <TinyGPS.h>
float flat,flon; // create variable for latitude and longitude object
SoftwareSerial gpsSerial(3,4);//tx,rx
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
TinyGPS gps; // create gps object

void setup(){
Serial.begin(9600); // connect serial
Serial.println("The GPS Received Signal:");
gpsSerial.begin(9600); // connect gps sensor
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print(" GPS_Location");
lcd.setCursor(0,1);
lcd.print(" Shashwat__Raj");
delay(8000);
lcd.clear();
}

static void smartdelay(unsigned long ms)
{
  unsigned long start = millis();
  do 
  {
    while (gpsSerial.available())
      gps.encode(gpsSerial.read());
  } while (millis() - start < ms);
}



void loop(){
  
smartdelay(1000);

  gps.f_get_position(&flat, &flon);



  
//while(gpsSerial.available()){ // check for gps data
//if(gps.encode(gpsSerial.read()))// encode gps data
//{
//gps.f_get_position(&lat,&lon); // get latitude and longitude

// display position
lcd.clear();
lcd.setCursor(1,0);
lcd.print("GPS Signal");

lcd.setCursor(1,0);
lcd.print("LAT:");
lcd.setCursor(5,0);
lcd.print(flat,7);
Serial.print(flat,7);
Serial.print(" ");
Serial.print(flon,7);
Serial.print(" ");
lcd.setCursor(0,1);
lcd.print(" LON:");
lcd.setCursor(5,1);
lcd.print(flon,7);
//}
//}

String latitude = String(flat,6);
String longitude = String(flon,6);
Serial.println(latitude+";"+longitude);
delay(1000);

}

Credits

Shashwat Raj

Shashwat Raj

7 projects • 12 followers
My name is Shashwat Raj. I love doing projects with arduino and Raspberry Pi. You want to view more please subscribe to my YouTube Channel.

Comments