I write this new subject because I have a very specific problem with my GPS module "NEO-6M GY-GPS6MV2".
I started to use this module to get a GPS positon thanks to the RX0 and TX0 pin of my mega2560. After 15 or 20min, i get a GPGLL position (I upload no code on my mega2560 to get this position).
But now, I want to use this code that I found on the internet :
#include <SoftwareSerial.h>
// setup gps serial
int gpsTxPin = 8;
int gpsRxPin = 9;
SoftwareSerial gpsSerial(gpsTxPin, gpsRxPin);
void setup()
{
Serial.begin(9600); //set monitor to 9600
gpsSerial.begin(9600); //adjust for GPS unit
Serial.println("Ready!");
}
void loop()
{
while(gpsSerial.available())
{
char c = gpsSerial.read();
Serial.print(c);
}
}
But "gpsSerial.available()" always return 0 and I really don't know why. I do a lot of research on the Internet, verify my wire a multiple of time, connect the VCC pin to the 3,3V of my mega2560 and GND pin of my mega2560 with no success. I don't know why the GPS work with no code on pin RX0 and TX0 but doesn't work on my pin 8 and 9 with SoftwareSerial.
Indeed, I'm a beginner in arduino programmation and I didn't realize that I have a lot of communication pin on my mega2560 (the example that I saw was with an arduino uno). My bad
Now I have a lot of NMEA sentences, but do you know how long it takes to have a full correct position ? For the moment I have a lot of sentences but they didn't gave me a postion ( I have a lot of blink inside the sentences).
Is the GPS outdoors with a clear view of the sky? if not, it is unlikely to get a fix. Mine will get a fix in my home office. The GPS is by a window and my house is one story wood framed and it will take 15 to 30 minutes to get a good fix if I haven't used it in a few weeks.