Tutorial to Communicate Neo-6M GPS to Arduino





This is an updated GPS module that can used with ardupilot mega v2. This GPS module uses the latest technology to give the best possible position information, allowing for better performance with your Ardupilot or other Multirotor control platform. You may require to configure this module for use with your flight controller (MultiWii Copter I2C GPS board requires 115200 baud). You will require a USB to FTDI adaptor board to do this. Please note that this module ships with defualt settings and a buad rate of 38400.


• Standalone GPS receiver

• Under 1 second time-to-first-fix for hot and aided starts

• SuperSense ® Indoor GPS: -162 dBm tracking sensitivity

• Anti-jamming technology


• U-blox 6 50 channel positioning engine with over 2 million effective correlators

• 5Hz position update rate

• Operating temperature range: -40 TO 85°C

• UART TTL socket

• EEprom to store settings

• Build in 18X18mm GPS antenna

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Material Preparation

In this tutorial, you will need to prepare as below :

1. NEO-6M GPS Module

2. Arduino Uno Board and USB

3. Female-Male Jumper Wire

4. GPS Antenna (optional, allow you to get signal more easily)

Step 2: Pinout Details

You could see the pinout labeled at the back of the module. It has 5 pins that is VCC, GND, RX , TX and PPS. VCC and GND are for power supply and RX and TX are for serial communication between microcontroller and GPS module.

Step 3: Pin Connection

Connect GPS Module to Arduino UNO as following :

  • VCC to 5V
  • GND to GND
  • RX to 9
  • TX to 10

Then, Connect your Arduino UNO Board to your computer via USB Cable.

Step 4: Libraries

SoftwareSerial is a library of Arduino which enables serial data communication through other digital pins of Arduino. The library replicates hardware functions and handles the task of serial communication. TinyGPS is a library that converts all those NMEA messages into a readable format by stuffing the character sequences into variables. To be able to interface GPS Module with arduino, you will have to download these libraries and extract it into your Arduino's libraries.

Step 5: Sample Source Code

Download the sample source code below and open it on your Arduino IDE. Select the correct board and port. Then, upload it into your Arduino Uno Board.

Step 6: Editing Hour

Some country have different time zone and some share the same time zone. Thus, you have to change the hour in the sample source code to make it exactly the same with your country's time zone unless you are from Malaysia or Singapore. As for Malaysia, it is UTC +08:00 (refer image above). Thus you can find the code below in the sample source code in the previous step.


UTC is the time standard commonly used across the world. You can check your country's UTC +##:## on your computer's or phone's time zone.

Step 7: Result

After you has succesfully uploaded your source code, open your serial monitor. Serial monitor will display the data that your gps required. If you didnt get anything, make sure your connection is correct and try it outside or near the window where it is easy to get the signal. Signal may not reach inside a building.

6 People Made This Project!


  • Made with Math Contest

    Made with Math Contest
  • Multi-Discipline Contest

    Multi-Discipline Contest
  • Robotics Contest

    Robotics Contest

18 Discussions


1 year ago

I'm having an interesting issue, when I use this or any other example that comes with TinyGPS serial monitor outputs all values in a way that makes sense, mostly what I'm watching is speed, walking along it shows 2kmph which seems about right, but when I try to couple the code with an OLED screen it all goes hay wire. It either constantly reads speed as -1 or -1.00 and doesn't change or just flashes the screen a lot as it updates but doens't actually change from -1.00.

Any ideas where I'm going wrong here?

1 reply

Reply 6 weeks ago

You need to hace a look at your variable assignments, for example try using floats or doubles


1 year ago

Is it ok to use Arduino Mega 2560 instead? if it is, what pin should i use? TX18 & RX19?


1 year ago

it shows latitude and longitude in different format $gprmc,,v,,,,,,,,,,*53

so plz help me to convert into right format


1 year ago

i think u can repalce void printFloat :

String latitude = String(lat,6);
String longitude = String(lon,6);


Question 1 year ago on Step 6

what about +5.30 time difference


Question 1 year ago

i need sim 800l code for my project i search for the code but it is not executed .
so , plz help me in code ?????......

2 answers
Ruchir SharmaVenkatP10

Answer 1 year ago

Hi venkat
I will upload gsm code in 1 or 2 hrs in my tutorial have a look.


Question 1 year ago on Step 4

hi sir
this is venkat
my question is why this tinygps
this tinygps is not added to my arduino ide library
plz send the gy_neo6mv2 gps module code.
i am doing project using gps,gsm(sim800l),ultrasonic sensor and esp8266 wifi module


2 years ago


I tried your code. But it doesnt give e the full output. Lat & log values are not loading

The output i get:

uBlox Neo 6M
Testing TinyGPS library v. 13
by Mikal Hart
Sizeof(gpsobject) = 115

3 replies

Reply 2 years ago

i think in the code that was downloaded :- in the first few lines the author has putit as

SoftwareSerial mySerial(10, 11);

change it to

SoftwareSerial mySerial(10, 9);

also preferably use a new ublox-6m gps module and also do attach an antenna . otherwise gps.encode() will not work [ i think!?]

even i encounterd a similar problem and if you still get the same reading then

//Serial.print(c); // uncomment to see raw GPS data

prefrebly uncomment the raw gps data


Reply 1 year ago

for UTC+05:30 what changes are to be done in these lines

Serial.print(" Time: "); Serial.print(static_cast<int>(hour+8)); Serial.print(":"); //Serial.print("UTC +08:00 Malaysia");

Serial.print(static_cast<int>(minute)); Serial.print(":"); Serial.print(static_cast<int>(second));

i.e in 92 and 93rd lines of the code


Reply 2 years ago

Hai Richaa.. I am facing the same problem. so do you manage to solve it ? please tell me how you solved it .. because i did as he said below but still same result


2 years ago

how to make it wireless?


2 years ago

Great tutorial, thnx!

I get the Lat and Long OK, but the ALT, SPEED, Course etc are all wrong.

Any ideas?