GPS Module (GY-NEO6MV2)

 RM 60.00
Description:
Communication Mode: TTL level, compatible with 3.3V/5V system
Power Supply: DC 2.7-5V
Working Current: 45MA
Catching Time:
+ Warm start: 1s
+ Cold start: 27s
Positional Accuracy: 5M

Features:
Use XM37-1612 module with high-gain active antenna
TTL level, compatible with 3.3V/5V system
The default baud rate: 9600
With rechargable backup battery, can save the ephemeris data when it power down, and make the warm start.
Suitable for RC quadcopter,navigator


Package included : GPS Module (GY-NEO6MV2) x 1 unit



Arduino Library : TinyGPSPlus

Arduino Pin Hookup


Arduino Code


#include <LiquidCrystal.h> #include <TinyGPS++.h> #include <SoftwareSerial.h> int RXPin = 2; int TXPin = 3; int GPSBaud = 9600; int ledPin = 13; TinyGPSPlus gps; SoftwareSerial gpsSerial(RXPin, TXPin); // RS Enable D4 D5 D6 D7 LiquidCrystal lcd(A0, A1, A2, A3, A4, A5); void setup() { pinMode(ledPin, OUTPUT); Serial.begin(9600); gpsSerial.begin(GPSBaud); lcd.begin(16, 2); } void loop() { while (gpsSerial.available() > 0) if (gps.encode(gpsSerial.read())) displayInfo(); if (millis() > 5000 && gps.charsProcessed() < 10) { Serial.println(F("No GPS detected")); while(true); } } void displayInfo() { Serial.print(F("Location: ")); if (gps.location.isValid()) { Serial.print(gps.location.lat(), 6); Serial.print(F(",")); Serial.print(gps.location.lng(), 6); lcd.setCursor(0,0); lcd.print(" "); lcd.setCursor(0,0); lcd.print(gps.location.lat()); lcd.print(" "); lcd.print(gps.location.lng()); } else { Serial.print(F("INVALID")); lcd.setCursor(0,0); lcd.print(" "); lcd.setCursor(0,0); lcd.print("INVALID"); } Serial.print(F(" Date/Time: ")); if (gps.date.isValid()) { Serial.print(gps.date.month()); Serial.print(F("/")); Serial.print(gps.date.day()); Serial.print(F("/")); Serial.print(gps.date.year()); lcd.setCursor(0,1); lcd.print(" "); lcd.setCursor(0,1); lcd.print(gps.date.month()); lcd.print("/"); lcd.print(gps.date.day()); lcd.print("/"); lcd.print(gps.date.year()); lcd.print(" "); } else { Serial.print(F("INVALID")); lcd.setCursor(0,1); lcd.print(" "); lcd.setCursor(0,1); lcd.print("INVALID "); } Serial.print(F(" ")); if (gps.time.isValid()) { if (gps.time.hour() < 10) { Serial.print(F("0")); lcd.print("0"); } Serial.print(gps.time.hour()); Serial.print(F(":")); lcd.print(gps.time.hour()); lcd.print(":"); if (gps.time.minute() < 10) { Serial.print(F("0")); lcd.print("0"); } Serial.print(gps.time.minute()); Serial.print(F(":")); lcd.print(gps.time.minute()); lcd.print(":"); if (gps.time.second() < 10) Serial.print(F("0")); Serial.print(gps.time.second()); Serial.print(F(".")); if (gps.time.centisecond() < 10) Serial.print(F("0")); Serial.print(gps.time.centisecond()); } else { Serial.print(F("INVALID")); lcd.print("INVALID"); } Serial.println(); }