SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about SparkFun's ALC PCB design services? Post them here!
User avatar
By simon_23ignacio
Good morning, How is your day going? My name is SIMON BECERRA, student in Panama, Technological University of Panama. :oops: :oops: :oops:

1 week ago I bought a product from SparkFun, called NEO m8p-2 GPS module.

I am connecting this module to an ARDUINO MEGA, using the neo m8p-2 module, you put RX-MOSI, TX-MISO, GND AND 5V, correctly to the ARDUINO MEGA.

I am using the TINY GPS Library in the ARDUINO program. using the simple test option.

I have left the m8p-2 module connected for about 1 hour and it does not send me an exact and precise location, it sends me 0 0 0 0 0 0 0 in all values.

I need your help, I am a student who is carrying out an innovative project at a national and perhaps international level.

On your blog it appears that it is compatible with Arduino (UNO OR MEGA), BUT it does not appear directly how to connect with these.
My question is: am I doing something wrong?, connecting everything wrong?, Are there any restrictions with the satellites around my country Panama?, Do I need anything else? something wrong with my library? which pins should (I connect rx tx vvc and gnd) something else?

Could you send me a blog or information on how to connect it correctly and directly to my arduino Mega or uno?

I am connecting the TX (from the neo m8p-2 module) to: RX (from the arduino)

I am connecting the RX (of the neo m8p-2 module) to: TX (of the arduino)

Unfortunately it does not send me information about my exact location.

Name: simón Ignacio becerra


Institutional email:

Telephone number (whatsapp): +507 62335239

[[img]blob: ... 71123a9c9e[/img]
blob: ... 71123a9c9e
User avatar
By simon_23ignacio
Hi! It's me Simon

Thanks for the tip, I didn't know this.

That's why he always dials me 00000000 using the tyni GPS library.

Please, can you contact me in WhatsApp or email? :lol: :D :mrgreen:

Pstt' taking about the anntena, I'm using neo 6mv2 anntena, is that correct for using it? Or have I to use another?

My WhatsApp is +507 62335239
User avatar
By simon_23ignacio
I'm also reading that I can use the mini usb port to get all the utilities of the neo m8p-2 module. Is this true, so I could avoid directly soldering the board :ugeek:

I mean, I can connect it directly from the GPS module to the usb port of my pc, so that it detects it, is that possible? Is the voltage compatible? It's not possible?
Is it better to only weld the dssel port?
User avatar
By simon_23ignacio
Hello, well what happens is that I did what you asked, I soldered the diesel and connected it but it still hasn't sent me the information I need, the location, any ideas what it could be? only rx, tx, vvc and gnd connector. It also tells me in the tyni gps code that the location that the code has is based in London. :| :|

How can I upload images so you can see everything I have done?
User avatar
By simon_23ignacio

Which one should I use to do what I want? (actualmente estoy utilizando el example4-movingBase_base. but it tells me that it does not detect my gps module
User avatar
By simon_23ignacio
from tyni gps im usyng this:

its using london ubication, does it implicate something?

#include <SoftwareSerial.h>

#include <TinyGPS.h>

/* This sample code demonstrates the normal use of a TinyGPS object.
It requires the use of SoftwareSerial, and assumes that you have a
4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).

TinyGPS gps;
SoftwareSerial ss(4, 3);

static void smartdelay(unsigned long ms);
static void print_float(float val, float invalid, int len, int prec);
static void print_int(unsigned long val, unsigned long invalid, int len);
static void print_date(TinyGPS &gps);
static void print_str(const char *str, int len);

void setup()

Serial.print("Testing TinyGPS library v. "); Serial.println(TinyGPS::library_version());
Serial.println("by Mikal Hart");
Serial.println("Sats HDOP Latitude Longitude Fix Date Time Date Alt Course Speed Card Distance Course Card Chars Sentences Checksum");
Serial.println(" (deg) (deg) Age Age (m) --- from GPS ---- ---- to London ---- RX RX Fail");


void loop()
float flat, flon;
unsigned long age, date, time, chars = 0;
unsigned short sentences = 0, failed = 0;
static const double LONDON_LAT = 51.508131, LONDON_LON = -0.128002;

print_int(gps.satellites(), TinyGPS::GPS_INVALID_SATELLITES, 5);
print_int(gps.hdop(), TinyGPS::GPS_INVALID_HDOP, 5);
gps.f_get_position(&flat, &flon, &age);
print_float(flat, TinyGPS::GPS_INVALID_F_ANGLE, 10, 6);
print_float(flon, TinyGPS::GPS_INVALID_F_ANGLE, 11, 6);
print_int(age, TinyGPS::GPS_INVALID_AGE, 5);
print_float(gps.f_altitude(), TinyGPS::GPS_INVALID_F_ALTITUDE, 7, 2);
print_float(gps.f_course(), TinyGPS::GPS_INVALID_F_ANGLE, 7, 2);
print_float(gps.f_speed_kmph(), TinyGPS::GPS_INVALID_F_SPEED, 6, 2);
print_str(gps.f_course() == TinyGPS::GPS_INVALID_F_ANGLE ? "*** " : TinyGPS::cardinal(gps.f_course()), 6);
print_int(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0xFFFFFFFF : (unsigned long)TinyGPS::distance_between(flat, flon, LONDON_LAT, LONDON_LON) / 1000, 0xFFFFFFFF, 9);
print_float(flat == TinyGPS::GPS_INVALID_F_ANGLE ? TinyGPS::GPS_INVALID_F_ANGLE : TinyGPS::course_to(flat, flon, LONDON_LAT, LONDON_LON), TinyGPS::GPS_INVALID_F_ANGLE, 7, 2);
print_str(flat == TinyGPS::GPS_INVALID_F_ANGLE ? "*** " : TinyGPS::cardinal(TinyGPS::course_to(flat, flon, LONDON_LAT, LONDON_LON)), 6);

gps.stats(&chars, &sentences, &failed);
print_int(chars, 0xFFFFFFFF, 6);
print_int(sentences, 0xFFFFFFFF, 10);
print_int(failed, 0xFFFFFFFF, 9);


static void smartdelay(unsigned long ms)
unsigned long start = millis();
while (ss.available())
} while (millis() - start < ms);

static void print_float(float val, float invalid, int len, int prec)
if (val == invalid)
while (len-- > 1)
Serial.print(' ');
Serial.print(val, prec);
int vi = abs((int)val);
int flen = prec + (val < 0.0 ? 2 : 1); // . and -
flen += vi >= 1000 ? 4 : vi >= 100 ? 3 : vi >= 10 ? 2 : 1;
for (int i=flen; i<len; ++i)
Serial.print(' ');

static void print_int(unsigned long val, unsigned long invalid, int len)
char sz[32];
if (val == invalid)
strcpy(sz, "*******");
sprintf(sz, "%ld", val);
sz[len] = 0;
for (int i=strlen(sz); i<len; ++i)
sz = ' ';
if (len > 0)
sz[len-1] = ' ';

static void print_date(TinyGPS &gps)
int year;
byte month, day, hour, minute, second, hundredths;
unsigned long age;
gps.crack_datetime(&year, &month, &day, &hour, &minute, &second, &hundredths, &age);
if (age == TinyGPS::GPS_INVALID_AGE)
Serial.print("********** ******** ");
char sz[32];
sprintf(sz, "%02d/%02d/%02d %02d:%02d:%02d ",
month, day, year, hour, minute, second);
print_int(age, TinyGPS::GPS_INVALID_AGE, 5);

static void print_str(const char *str, int len)
int slen = strlen(str);
for (int i=0; i<len; ++i)
Serial.print(i<slen ? str : ' ');
 Topic permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum