Subscribe to Arduino Academy and start learning today for FREE!

Arduino & uBlox Neo 6M GPS

A buddy of mine sent me a Neo 6M GPS module and said “figure it out”. Cool, I love projects like this.

Also see our Raspberry Pi version!

There are 4 connections, TX, RX, VCC and Gnd. I connected TX of the module to pin 10 on the Arduino, Rx to Pin 11, VCC to 5v, and Gnd to Gnd.

I started with a simple SoftwareSerial demo to make sure I could read the module:

Become the Maker you were born to be. Try Arduino Academy for FREE!

#include “SoftwareSerial.h”

SoftwareSerial mySerial(10, 11); // RX, TX

void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);

Serial.println(“uBlox Neo 6M”);

// set the data rate for the SoftwareSerial port
mySerial.begin(9600);

}

void loop() // run over and over
{
if (mySerial.available())
Serial.write(mySerial.read());

}

Then I added Mikal Hart’s TinyGPS Library and sample code. This converts all those NMEA messages into a readable format by stuffing the character sequences into variables.

After a bit of massaging, here is the final result:

http://tny.cz/d19906cc (code)

I still have more work to do, like displaying selected data on a LCD, but now that the data is in variables, that’s easy. See http://arduinotronics.blogspot.com/2014/03/gps-on-lcd.html

Subscribe
Notify of
guest
10 Comments
Inline Feedbacks
View all comments
reza
reza
3 years ago

six years later… greeting to andrews from another side of planet ๐Ÿ™‚

vikram babu
6 years ago

Good one

gurudatta kr
6 years ago

How to connect it to raspberry pi 3 using python language?

soundarrajan v
6 years ago

i need code to connect the same gps module to interface with Mega 2560

Niki
5 years ago

Im stuck at this

uBlox Neo 6M
Testing TinyGPS library v. 13
by Mikal Hart

Sizeof(gpsobject) = 115

cannot receive any info. Can u help?

Steve Spence
5 years ago

Is it possible your GPS module is indoors and can't see a satellite or three? You will have to contact Mikal Hart on that.

prometheus
5 years ago

can used this code for arduino pro mini?

Steve Spence
5 years ago

Yes, the pro mini is code compatible with the UNO.

Unknown
4 years ago

can i use arduino mega

Steve Spence
4 years ago

of course.

Archives

10
0
Would love your thoughts, please comment.x
()
x