GPS Shield - Fastrax UP501 with Freaduino Mega2560 problem

Hello,

I'm working with a GPS Shield - Fastrax UP501 and a Freaduino Mega2560.

I try to execute some examples, but I can't get data from GPS.

I'm using the default configuration.

The GPS Shield is on de Freaduino board, without any extra cable.

Any suggests?

This is my code:

#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(3, 2);

void setup()
{
  Serial.begin(115200);
  ss.begin(9600);
  
  Serial.print("Simple TinyGPS library v. "); Serial.println(TinyGPS::library_version());
  Serial.println("by Mikal Hart");
  Serial.println();
}

void loop()
{
  bool newData = false;
  unsigned long chars;
  unsigned short sentences, failed;

  // For one second we parse GPS data and report some key values
  for (unsigned long start = millis(); millis() - start < 1000;)
  {
    while (ss.available())
    {
      char c = ss.read();
      // Serial.write(c); // uncomment this line if you want to see the GPS data flowing
      if (gps.encode(c)) // Did a new valid sentence come in?
        newData = true;
    }
  }

  if (newData)
  {
    float flat, flon;
    unsigned long age;
    gps.f_get_position(&flat, &flon, &age);
    Serial.print("LAT=");
    Serial.print(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flat, 6);
    Serial.print(" LON=");
    Serial.print(flon == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : flon, 6);
    Serial.print(" SAT=");
    Serial.print(gps.satellites() == TinyGPS::GPS_INVALID_SATELLITES ? 0 : gps.satellites());
    Serial.print(" PREC=");
    Serial.print(gps.hdop() == TinyGPS::GPS_INVALID_HDOP ? 0 : gps.hdop());
  }
  
  gps.stats(&chars, &sentences, &failed);
  Serial.print(" CHARS=");
  Serial.print(chars);
  Serial.print(" SENTENCES=");
  Serial.print(sentences);
  Serial.print(" CSUM ERR=");
  Serial.println(failed);
  if (chars == 0)
    Serial.println("** No characters received from GPS: check wiring **");
}

Serial Monitor Output

** No characters received from GPS: check wiring **
CHARS=0 SENTENCES=0 CSUM ERR=0
** No characters received from GPS: check wiring **

These are my boards:

![](http://i.ebayimg.com/00/s/MTIwMFgxMjAw/z/7ikAAOxyNSVSTqME/$(KGrHqZ,!ngFJB2y805,BSTqMEK9CQ~~60_35.JPG)

and a Freaduino Mega2560.

With 4 hardware serial ports. So, why are you trying to use SoftwareSerial? Did you even look at the SoftwareSerial page to see which pins on the Mega can be used?

I'm based on differents examples from web.

How can I use one of the hardware serial ports?

I've read that the GPS Shield has a hardware serial port (0 y 1). But, how can I use another one?

Do you sugget that I have to join with a cable some pins from the GPS Shield with de Freaduino?

Thanks in advance.
Martín

How can I use one of the hardware serial ports?

That's hard to say from the picture. You probably should have done some research before buying those two pieces of hardware, to be sure that they could be used together.

Post a link to the GPS shield.

Finally, I could use another hardware serial port pluggin the GPS Shield with the Freaduino board.

I cound not use it by a Software Serial port. I think it would be useful with an Arduino UNO board.

Thanks,
Martín