Skip to main content

GPS Module to Track Location

//Code to interface GPS module to track current location

#include <TinyGPS++.h>
#include <SoftwareSerial.h>

TinyGPSPlus gps;
SoftwareSerial ss(4, 3);

void setup() {
  Serial.begin(9600);
  ss.begin(9600);
}
void loop() {
  while (ss.available() > 0) {
    gps.encode(ss.read());
    if (gps.location.isUpdated()) {
      Serial.print("Latitude= ");
      Serial.print(gps.location.lat(), 6);
      Serial.print(" Longitude= ");
      Serial.println(gps.location.lng(), 6);
    }
  }
}



Online Quiz

Learn all concept on Arduino Tutorial from our channel to get better ideas.

Free E-Certificate will be issued for the participants through mail who secure more than 60% score. Thanks. All the best.

Comments

Popular posts from this blog

10 Years of Excellence

U Can Project Solution