GPS module with tinyGPS library, not getting chars RX values

Hi,

im using the GY-GPS6MV1 GPS APM2.5 Module w/ Antenna - Deep Blue (3~5V) GPS module, but ran into a problem. I took the test_with_gps_device test code from the library, changed the pins from the standard 4 and 3 to the digital 3 and 2 I'm using. I also changed the baud rate to the correct speed for my module.

But I'm still not getting a chars RX value back from the arduino. It keeps on giving the same value of 0. Because of it I'm also not getting a postion fix. What could be causing this problem? (not too experienced in arduino)

Seeing your program would help considerably, don't you think ?
Are you trying this indoors and, if so, are you getting a GPS lock ?

This is the program.
I’m using it inside, and know this is why even if I would have an increasing chars RX value, I wouldnt get a fix. BTW, using an arduino mega 2560

GPS_log.ino (4.3 KB)

Do the simple echo test:

void setup()
{
  Serial.begin(115200);
  ss.begin(9600);

  Serial.println( F("Echo test") ); 
}

void loop()
{
    while (ss.available())
      Serial.write( ss.read() );
}

This will make sure you're getting something.

Of course, GPS TX goes to pin 3 (ss rx), and GPS RX goes tp pin 2 (ss tx).

Cheers,
/dev

When I did the echo test, I did get the text back

So you're getting the text from the GPS? Lines that start with "$GPGGA", "$GPRMC", etc.?

If that's what is displaying with the echo test, you can take one more step with this loop():

TinyGPS gps;

void loop()
{
    while (ss.available()) {
      if (gps.encode( ss.read() )) {

        // We got a complete sentence, print out which kind.
        Serial.println( (int) gps.sentence_type() );

      }
    }
}

This will print out 0, 1 or 2 if a GPGGA, GPRMC, or other sentence type is successfully decoded, respectively.

If this works, you should be able to paste in all the TinyGPS code.

Or you could continue making incremental changes until it does what you want. Actually, if the above loop works, you could start calling gps.get_position:

TinyGPS gps;

void loop()
{
  while (ss.available()) {
    if (gps.encode( ss.read() )) {

      //  We got a sentence, what kind is it?
      if (gps.sentence_type() == TinyGPS::_GPS_SENTENCE_GPRMC) {

        // We get a GPRMC once per second, let's print our lat/lon

        float lat, lon;
        gps.get_position( &lat, &lon );

        if (lat == TinyGPS::GPS_INVALID_F_ANGLE) {
          Serial.println( F("?, ?") );
        } else {
          Serial.print( lat );
          Serial.print( F(", ") );
          Serial.println( lon );
        }
      }
    }
  }
}

Cheers,
/dev

Fixed it! When I switched to a hardware serial, it worked perfectly.
Thanks for the help anyways