

This document provides a detailed overview of a GPS tracking circuit that utilizes an Arduino Nano microcontroller and a GPS NEO 6M module. The Arduino Nano is programmed to communicate with the GPS module to receive and process GPS data, which includes latitude, longitude, altitude, and the number of satellites in view. The processed data is then output to the Serial Monitor for real-time tracking.
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
// Create an instance of TinyGPS++
TinyGPSPlus gps;
// Define the pins for Software Serial (RX, TX)
SoftwareSerial gpsSerial(4, 3); // RX, TX
void setup() {
// Initialize Serial Monitor for debugging
Serial.begin(9600);
// Initialize GPS Serial
gpsSerial.begin(9600);
Serial.println("GPS Location Tracker");
}
void loop() {
// Check if GPS data is available
while (gpsSerial.available() > 0) {
// Feed GPS data into TinyGPS++
gps.encode(gpsSerial.read());
// If GPS location is updated, print it
if (gps.location.isUpdated()) {
Serial.print("Latitude: ");
Serial.println(gps.location.lat(), 6); // 6 decimal places for precision
Serial.print("Longitude: ");
Serial.println(gps.location.lng(), 6); // 6 decimal places for precision
Serial.print("Altitude: ");
Serial.println(gps.altitude.meters());
Serial.print("Satellites: ");
Serial.println(gps.satellites.value());
}
}
}
File Name: sketch.ino
Description: This Arduino sketch initializes a SoftwareSerial connection to the GPS NEO 6M module on pins D4 and D3. It reads incoming GPS data and uses the TinyGPS++ library to parse the data. When a new location is available, it prints the latitude, longitude, altitude, and the number of satellites to the Serial Monitor.