Cannot receive serial GPS data to a MEGA ADK

I have been trying to print (through serial communication, both SoftwareSerial and hardware serial ports) GPS data from my parallax PMB-648 to the serial monitor. I have tried the code form the example parallax gives @ http://learn.parallax.com/kickstart/28500 and all I get on the serial monitor is "Reading GPS". I have tried the example that can be found at http://www.arduino.cc/playground/Tutorials/GPS which did display GPS data on the monitor, however to get it to work I had to disconnect the Tx pin of the GPS module before uploading then upload then open the monitor and then connect the Tx pin of the GPS module in order to receive the data. I have also tried using one of the additional hardware serial ports that the board has using code from a post found at http://arduino.cc/forum/index.php/topic,107876.0.html I made all the same modifications as the person who posted yet all I end up with on the serial monitor is

Testing TinyGPS library v. 9 by Mikal Hart

Sizeof(gpsobject) = 103

To conclude I have only read the GPS data using pins 0 and 1 and that has been less that ideal and have yet to get either the SoftwareSerial or the additional hardware serial ports to function.

Any ideas, or additional information needed?

Thanks,

I have tried the example that can be found at http://www.arduino.cc/playground/Tutorials/GPS which did display GPS data on the monitor, however to get it to work I had to disconnect the Tx pin of the GPS module before uploading then upload then open the monitor and then connect the Tx pin of the GPS module in order to receive the data.

Take that code then, change Serial to SerialN, and connect the GPS to the RXN and TXN pins, where N is 1, 2, or 3.

Clearly, the GPS is working, and the code is able to manipulate the data it gets from the GPS. All you need to do is quit using the RX/TX pins, and the Serial instance that goes with them. Use two other RX/TX pins and the corresponding SerialN instance.

I made all the same modifications as the person who posted yet all I end up with on the serial monitor is

You made some changes to the code, but don't tell us what they are, and connected the GPS to some other pins, but don't tell us what they are, and it doesn't work, and you want us to tell you why. Does that seem reasonable?

No Paul, now that you mention it, it seems totally unresonable. The modified code is below.

#include <SoftwareSerial.h>
#include <TinyGPS.h>

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

TinyGPS gps;
//SoftwareSerial nss(2, 3);

void gpsdump(TinyGPS &gps);
bool feedgps();
void printFloat(double f, int digits = 2);

void setup()
{
  Serial.begin(115200);
  Serial2.begin(4800);
  
  Serial.print("Testing TinyGPS library v. "); Serial.println(TinyGPS::library_version());
  Serial.println("by Mikal Hart");
  Serial.println();
  Serial.print("Sizeof(gpsobject) = "); Serial.println(sizeof(TinyGPS));
  Serial.println();
}

void loop()
{
  bool newdata = false;
  unsigned long start = millis();

  // Every 5 seconds we print an update
  while (millis() - start < 5000)
  {
    if (feedgps())
      newdata = true;
  }
  
  if (newdata)
  {
    Serial.println("Acquired Data");
    Serial.println("-------------");
    gpsdump(gps);
    Serial.println("-------------");
    Serial.println();
  }
}

void printFloat(double number, int digits)
{
  // Handle negative numbers
  if (number < 0.0)
  {
     Serial.print('-');
     number = -number;
  }

  // Round correctly so that print(1.999, 2) prints as "2.00"
  double rounding = 0.5;
  for (uint8_t i=0; i<digits; ++i)
    rounding /= 10.0;
  
  number += rounding;

  // Extract the integer part of the number and print it
  unsigned long int_part = (unsigned long)number;
  double remainder = number - (double)int_part;
  Serial.print(int_part);

  // Print the decimal point, but only if there are digits beyond
  if (digits > 0)
    Serial.print("."); 

  // Extract digits from the remainder one at a time
  while (digits-- > 0)
  {
    remainder *= 10.0;
    int toPrint = int(remainder);
    Serial.print(toPrint);
    remainder -= toPrint; 
  } 
}

void gpsdump(TinyGPS &gps)
{
  long lat, lon;
  float flat, flon;
  unsigned long age, date, time, chars;
  int year;
  byte month, day, hour, minute, second, hundredths;
  unsigned short sentences, failed;

  gps.get_position(&lat, &lon, &age);
  Serial.print("Lat/Long(10^-5 deg): "); Serial.print(lat); Serial.print(", "); Serial.print(lon); 
  Serial.print(" Fix age: "); Serial.print(age); Serial.println("ms.");
  
  feedgps(); // If we don't feed the gps during this long routine, we may drop characters and get checksum errors

  gps.f_get_position(&flat, &flon, &age);
  Serial.print("Lat/Long(float): "); printFloat(flat, 5); Serial.print(", "); printFloat(flon, 5);
  Serial.print(" Fix age: "); Serial.print(age); Serial.println("ms.");

  feedgps();

  gps.get_datetime(&date, &time, &age);
  Serial.print("Date(ddmmyy): "); Serial.print(date); Serial.print(" Time(hhmmsscc): "); Serial.print(time);
  Serial.print(" Fix age: "); Serial.print(age); Serial.println("ms.");

  feedgps();

  gps.crack_datetime(&year, &month, &day, &hour, &minute, &second, &hundredths, &age);
  Serial.print("Date: "); Serial.print(static_cast<int>(month)); Serial.print("/"); Serial.print(static_cast<int>(day)); Serial.print("/"); Serial.print(year);
  Serial.print("  Time: "); Serial.print(static_cast<int>(hour)); Serial.print(":"); Serial.print(static_cast<int>(minute)); Serial.print(":"); Serial.print(static_cast<int>(second)); Serial.print("."); Serial.print(static_cast<int>(hundredths));
  Serial.print("  Fix age: ");  Serial.print(age); Serial.println("ms.");
  
  feedgps();

  Serial.print("Alt(cm): "); Serial.print(gps.altitude()); Serial.print(" Course(10^-2 deg): "); Serial.print(gps.course()); Serial.print(" Speed(10^-2 knots): "); Serial.println(gps.speed());
  Serial.print("Alt(float): "); printFloat(gps.f_altitude()); Serial.print(" Course(float): "); printFloat(gps.f_course()); Serial.println();
  Serial.print("Speed(knots): "); printFloat(gps.f_speed_knots()); Serial.print(" (mph): ");  printFloat(gps.f_speed_mph());
  Serial.print(" (mps): "); printFloat(gps.f_speed_mps()); Serial.print(" (kmph): "); printFloat(gps.f_speed_kmph()); Serial.println();

  feedgps();

  gps.stats(&chars, &sentences, &failed);
  Serial.print("Stats: characters: "); Serial.print(chars); Serial.print(" sentences: "); Serial.print(sentences); Serial.print(" failed checksum: "); Serial.println(failed);
}
  
bool feedgps()
{
  while (Serial2.available())
  {
    if (gps.encode(Serial2.read()))
      return true;
  }
  return false;
}

And as I said before all I get on the monitor is:

(Testing TinyGPS library v. 9
by Mikal Hart

Sizeof(gpsobject) = 103)

And I do not see the Rx led on the board blinking.

I do have the Tx singal from the GPS connected to SerialRx (pin 17) of the board and Rx signal of the GPS connected to the SerialTx (pin 16) of the board.

Paul, I also edited the exaple code that I was able to receive GPS data with using pins 0 and 1 to use Serial2 as you said. The results on the serial monitor were jibberish, as if the baud rates in the code and what was set in the serial monitor did not match, although they were the same, and just to be sure I tried every baud rate the monitor had to offer, with no good results. The Rx led on the board was not flashing or lit during the serial read out to the monitor either, if that indicates anything to you. The modified code is below.

#include <string.h>
 #include <ctype.h>
 
 int ledPin = 13;                  // LED test pin
 //int rxPin = 0;                    // RX PIN 
 //int txPin = 1;                    // TX TX
 int byteGPS=-1;
 char linea[300] = "";
 char comandoGPR[7] = "$GPRMC";
 int cont=0;
 int bien=0;
 int conta=0;
 int indices[13];
 
 void setup() {
   pinMode(ledPin, OUTPUT);       // Initialize LED pin
   //pinMode(rxPin, INPUT);
   //pinMode(txPin, OUTPUT);
   Serial.begin(115200);
   Serial2.begin(4800);
   for (int i=0;i<300;i++){       // Initialize a buffer for received data
     linea[i]=' ';
   }   
 }
 
 void loop() {
   digitalWrite(ledPin, HIGH);
   byteGPS=Serial2.read();    // Read a byte of the serial port
  // Serial.print("Phase 1 ");
   if (byteGPS == -1) {           // See if the port is empty yet
     delay(100); 
     //Serial.print("Phase 2 ");
     
   } else {
     linea[conta]=byteGPS;        // If there is serial port data, it is put in the buffer
     conta++;   
     
     Serial.print(byteGPS,byte());      
     //Serial.print("Phase 3 ");
    
     if (byteGPS==13){            // If the received byte is = to 13, end of transmission
       digitalWrite(ledPin, LOW); 
       cont=0;
       bien=0;
       for (int i=1;i<7;i++){     // Verifies if the received command starts with $GPR
         if (linea[i]==comandoGPR[i-1]){
           bien++;
         }
       }
       if(bien==6){               // If yes, continue and process the data
         for (int i=0;i<300;i++){
           if (linea[i]==','){    // check for the position of the  "," separator
             indices[cont]=i;
             cont++;
           }
           if (linea[i]=='*'){    // ... and the "*"
             indices[12]=i;
             cont++;
           }
         }
         Serial.println("");      // ... and write to the serial port
         Serial.println("");
         Serial.println("---------------");
         for (int i=0;i<12;i++){
           switch(i){
             case 0 :Serial.print("Time in UTC (HhMmSs): ");break;
             case 1 :Serial.print("Status (A=OK,V=KO): ");break;
             case 2 :Serial.print("Latitude: ");break;
             case 3 :Serial.print("Direction (N/S): ");break;
             case 4 :Serial.print("Longitude: ");break;
             case 5 :Serial.print("Direction (E/W): ");break;
             case 6 :Serial.print("Velocity in knots: ");break;
             case 7 :Serial.print("Heading in degrees: ");break;
             case 8 :Serial.print("Date UTC (DdMmAa): ");break;
             case 9 :Serial.print("Magnetic degrees: ");break;
             case 10 :Serial.print("(E/W): ");break;
             case 11 :Serial.print("Mode: ");break;
             case 12 :Serial.print("Checksum: ");break;
           }
           for (int j=indices[i];j<(indices[i+1]-1);j++){
             Serial.print(linea[j+1]); 
           }
           Serial.println("");
         }
         Serial.println("---------------");
       }
       conta=0;                    // Reset the buffer
       for (int i=0;i<300;i++){    //  
         linea[i]=' ';             
       }                 
     }
   }
 }

I'm not sure if this would make a difference, but I am only using a the Parallax GPS module and no shield. I have read about a DLINE switch on the shield that should be used when using SoftwareSerial and I'm unsure if directly connecting the module without the switched shield could have something to do with the problems I'm experiencing.

The current version of Tiny GPS (Ver 12) works very well on a Mega, an Uno V2&3 and a Pro-mini. I have versions that I've modified to work on a 2X16, 4X20, ST7735 GLCD and with the UTFT library and an Itead 3.2" 320X240 GLCD. All work equally well with a U-Blox 6_1 and a Skylabs SKM53. Get the current Lib and it will work. The Lib is easier to use as well.

Bob

I tried TinyGPS (Ver 12) and I still receive no GPS data on the monitor, all I get is :

Testing TinyGPS library v. 12
by Mikal Hart

Sizeof(gpsobject) = 115

I’m using the following code with pins 19 and 18 on the ADK board.

#include <SoftwareSerial.h>

#include <SoftwareSerial.h>
#include <TinyGPS.h>

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

TinyGPS gps;
//SoftwareSerial nss(2, 3);

void gpsdump(TinyGPS &gps);
bool feedgps();
void printFloat(double f, int digits = 2);

void setup()
{
  Serial.begin(115200);
  Serial1.begin(4800);
  
  Serial.print("Testing TinyGPS library v. "); Serial.println(TinyGPS::library_version());
  Serial.println("by Mikal Hart");
  Serial.println();
  Serial.print("Sizeof(gpsobject) = "); Serial.println(sizeof(TinyGPS));
  Serial.println();
}

void loop()
{
  bool newdata = false;
  unsigned long start = millis();

  // Every 5 seconds we print an update
  while (millis() - start < 5000)
  {
    if (feedgps())
      newdata = true;
  }
  
  if (newdata)
  {
    Serial.println("Acquired Data");
    Serial.println("-------------");
    gpsdump(gps);
    Serial.println("-------------");
    Serial.println();
  }
}

void printFloat(double number, int digits)
{
  // Handle negative numbers
  if (number < 0.0)
  {
     Serial.print('-');
     number = -number;
  }

  // Round correctly so that print(1.999, 2) prints as "2.00"
  double rounding = 0.5;
  for (uint8_t i=0; i<digits; ++i)
    rounding /= 10.0;
  
  number += rounding;

  // Extract the integer part of the number and print it
  unsigned long int_part = (unsigned long)number;
  double remainder = number - (double)int_part;
  Serial.print(int_part);

  // Print the decimal point, but only if there are digits beyond
  if (digits > 0)
    Serial.print("."); 

  // Extract digits from the remainder one at a time
  while (digits-- > 0)
  {
    remainder *= 10.0;
    int toPrint = int(remainder);
    Serial.print(toPrint);
    remainder -= toPrint; 
  } 
}

void gpsdump(TinyGPS &gps)
{
  long lat, lon;
  float flat, flon;
  unsigned long age, date, time, chars;
  int year;
  byte month, day, hour, minute, second, hundredths;
  unsigned short sentences, failed;

  gps.get_position(&lat, &lon, &age);
  Serial.print("Lat/Long(10^-5 deg): "); Serial.print(lat); Serial.print(", "); Serial.print(lon); 
  Serial.print(" Fix age: "); Serial.print(age); Serial.println("ms.");
  
  feedgps(); // If we don't feed the gps during this long routine, we may drop characters and get checksum errors

  gps.f_get_position(&flat, &flon, &age);
  Serial.print("Lat/Long(float): "); printFloat(flat, 5); Serial.print(", "); printFloat(flon, 5);
  Serial.print(" Fix age: "); Serial.print(age); Serial.println("ms.");

  feedgps();

  gps.get_datetime(&date, &time, &age);
  Serial.print("Date(ddmmyy): "); Serial.print(date); Serial.print(" Time(hhmmsscc): "); Serial.print(time);
  Serial.print(" Fix age: "); Serial.print(age); Serial.println("ms.");

  feedgps();

  gps.crack_datetime(&year, &month, &day, &hour, &minute, &second, &hundredths, &age);
  Serial.print("Date: "); Serial.print(static_cast<int>(month)); Serial.print("/"); Serial.print(static_cast<int>(day)); Serial.print("/"); Serial.print(year);
  Serial.print("  Time: "); Serial.print(static_cast<int>(hour)); Serial.print(":"); Serial.print(static_cast<int>(minute)); Serial.print(":"); Serial.print(static_cast<int>(second)); Serial.print("."); Serial.print(static_cast<int>(hundredths));
  Serial.print("  Fix age: ");  Serial.print(age); Serial.println("ms.");
  
  feedgps();

  Serial.print("Alt(cm): "); Serial.print(gps.altitude()); Serial.print(" Course(10^-2 deg): "); Serial.print(gps.course()); Serial.print(" Speed(10^-2 knots): "); Serial.println(gps.speed());
  Serial.print("Alt(float): "); printFloat(gps.f_altitude()); Serial.print(" Course(float): "); printFloat(gps.f_course()); Serial.println();
  Serial.print("Speed(knots): "); printFloat(gps.f_speed_knots()); Serial.print(" (mph): ");  printFloat(gps.f_speed_mph());
  Serial.print(" (mps): "); printFloat(gps.f_speed_mps()); Serial.print(" (kmph): "); printFloat(gps.f_speed_kmph()); Serial.println();

  feedgps();

  gps.stats(&chars, &sentences, &failed);
  Serial.print("Stats: characters: "); Serial.print(chars); Serial.print(" sentences: "); Serial.print(sentences); Serial.print(" failed checksum: "); Serial.println(failed);
}
  
bool feedgps()
{
  while (Serial1.available())
  {
    if (gps.encode(Serial1.read()))
      return true;
  }
  return false;
}

Is that sketch from TinyGPS9 or TinyGPS12. It doesn't look Like The sketch that came in the TinyGPS12 Lib... there were issues I had with earlier versions that I never got resolved until I went to TinyGPS12. TinyGPS, test_with_gps_device.pde has always worked for me on the Uno and Mini-pro and now a mega and the first 20 or so lines look as they are from a different sketch compared with the tinyGPS12 lib... Hope this helps.

Bob

Why are you still including SoftwareSerial.h? Twice, even?

Docedison,

the code I used was not from the example for Ver 12. I will give the example code provided with the new version a try tonight.

Thank you

PaulS,

The SoftwareSerial.h was included in the code that I coppied from the forum post that I mentioned in my innitial post. The code was origionally intended to use SoftwareSerial and then edited to use Serial2, which was reported to work by that persons post. I guess I forgot to comment those lines out, I didn't think it would have made a difference other than making the code a bit bigger and more clumsy.

Thanks,

Ok, I have tried the code examples provided with the ver 12 of TinyGPS and I still am not receiving data from the GPS module. The code I uploaded is below:

#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 3(rx) and 4(tx).
*/

TinyGPS gps;
SoftwareSerial nss(3, 4);

static void gpsdump(TinyGPS &gps);
static bool feedgps();
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.begin(115200);
  nss.begin(4800);
  
  Serial.print("Testing TinyGPS library v. "); Serial.println(TinyGPS::library_version());
  Serial.println("by Mikal Hart");
  Serial.println();
  Serial.print("Sizeof(gpsobject) = "); Serial.println(sizeof(TinyGPS));
  Serial.println();
  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");
  Serial.println("--------------------------------------------------------------------------------------------------------------------------------------");
}

void loop()
{
  bool newdata = false;
  unsigned long start = millis();
  
  // Every second we print an update
  while (millis() - start < 1000)
  {
    if (feedgps())
      newdata = true;
  }
  
  gpsdump(gps);
}

static void gpsdump(TinyGPS &gps)
{
  float flat, flon;
  unsigned long age, date, time, chars = 0;
  unsigned short sentences = 0, failed = 0;
  static const float 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, 9, 5);
  print_float(flon, TinyGPS::GPS_INVALID_F_ANGLE, 10, 5);
  print_int(age, TinyGPS::GPS_INVALID_AGE, 5);

  print_date(gps);

  print_float(gps.f_altitude(), TinyGPS::GPS_INVALID_F_ALTITUDE, 8, 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 ? 0UL : (unsigned long)TinyGPS::distance_between(flat, flon, LONDON_LAT, LONDON_LON) / 1000, 0xFFFFFFFF, 9);
  print_float(flat == TinyGPS::GPS_INVALID_F_ANGLE ? 0.0 : TinyGPS::course_to(flat, flon, 51.508131, -0.128002), 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);
  Serial.println();
}

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

static void print_float(float val, float invalid, int len, int prec)
{
  char sz[32];
  if (val == invalid)
  {
    strcpy(sz, "*******");
    sz[len] = 0;
        if (len > 0) 
          sz[len-1] = ' ';
    for (int i=7; i<len; ++i)
        sz[i] = ' ';
    Serial.print(sz);
  }
  else
  {
    Serial.print(val, prec);
    int vi = abs((int)val);
    int flen = prec + (val < 0.0 ? 2 : 1);
    flen += vi >= 1000 ? 4 : vi >= 100 ? 3 : vi >= 10 ? 2 : 1;
    for (int i=flen; i<len; ++i)
      Serial.print(" ");
  }
  feedgps();
}

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("*******    *******    ");
  else
  {
    char sz[32];
    sprintf(sz, "%02d/%02d/%02d %02d:%02d:%02d   ",
        month, day, year, hour, minute, second);
    Serial.print(sz);
  }
  print_int(age, TinyGPS::GPS_INVALID_AGE, 5);
  feedgps();
}

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[i] : ' ');
  feedgps();
}

static bool feedgps()
{
  while (nss.available())
  {
    if (gps.encode(nss.read()))
      return true;
  }
  return false;
}

The results on the monitor are as followes:

Testing TinyGPS library v. 12
by Mikal Hart

Sizeof(gpsobject) = 115

Sats HDOP Latitude Longitude Fix  Date       Time       Date Alt     Course Speed Card  Distance Course Card  Chars Sentences Checksum
          (deg)    (deg)     Age                        Age  (m)     --- from GPS ----  ---- to London  ----  RX    RX        Fail
--------------------------------------------------------------------------------------------------------------------------------------
**** **** *******  *******   **** *******    *******    **** ******* ****** ***** ***   0        0.00   ***   0     0         0        
**** **** *******  *******   **** *******    *******    **** ******* ****** ***** ***   0        0.00   ***   0     0         0        
**** **** *******  *******   **** *******    *******    **** ******* ****** ***** ***   0        0.00   ***   0     0         0        
**** **** *******  *******   **** *******    *******    **** ******* ****** ***** ***   0        0.00   ***   0     0         0        
**** **** *******  *******   **** *******    *******    **** ******* ****** ***** ***   0        0.00   ***   0     0         0        
**** **** *******  *******   **** *******    *******    **** ******* ****** ***** ***   0        0.00   ***   0     0         0        
**** **** *******  *******   **** *******    *******    **** ******* ****** ***** ***   0        0.00   ***   0     0         0        
**** **** *******  *******   **** *******    *******    **** ******* ****** ***** ***   0        0.00   ***   0     0         0        
**** **** *******  *******   **** *******    *******    **** ******* ****** ***** ***   0        0.00   ***   0     0         0

I have recieved GPS data on serial pins 0 and 1 using the code found on http://www.arduino.cc/playground/Tutorials/GPS so the GPS module works. I have tried several examples using SerialSoftware and there too, I received no GPS data. I have used SoftwareSerial to communicate with a serial LCD which was successful, but that module is receiving, and not transmitting as the GPS module does. I am running out of ideas…

Unfortunately for several reasons a GPS receiver is in an acquisition mode creating it's ephemeris this can take 45 seconds to several minutes depending on signal strength of received data and length to time powered up... what I am trying to say is that if the receiver can''t "hear the satellites it can't return data... sooner or later then you should be able to use the receiver. Leave the program and receiver running or at least keep power on the GPS for a minute... give or take depending on receiver. The sketch will start to work or at least this is my experience. There exist other GPS Libs one by Adafruit that you might try as well. I've used both and both work well for me but I am near a window and I know it won't work in all area's of my apartment. I have a windows diagnostic tool for U-Blox GPS receivers and because of poor signal strength my location moves in an ellipse centered as if I were in one quadrant of an ellipse, that is a plot on google maps from this utility sees me in an area bounded by the building's shape that I live in, roughly elliptical in shape and this pattern is due to signal variations or loss of data from calculation to calculation without any smoothing applied to "normalize" my position in space. My elevation change 20 meters in 15 seconds and does. However I don't care about that except as just interesting for a few moments, I use mine only for time. It's the most accurate non tethered hardware solution unfortunately it's the least reliable as I am coming to find out. I think a final answer for me is going to be to remote the GPS receiver so it does have a better look at the sky... Possibly for you too. The sketch works I've re-written it some time back to display on a 4X20 LCD although I have no idea of where it is, that was 2 computers ago.

Bob

My GPS devices take up to 10 minutes to start up, but during that time they still output the NMEA serial data. So you should be getting something from the device, even if the strings contain a lot of commas with no values.

Have you checked that your GPS device is actually outputing the text type GPS NMEA messages ? It might be outputting some kind of proprietary binary data format. You could check this by connecting the GPS device to a computer serial port and printing the characters it is putting out.

I got a new ADK board and it is now working. The problem seems to have been to do with the additional hardware serial portrs. That does not explain why I wasn't able to get it to work with SoftwareSerial though. I have not tried to receive the GPS data through SoftwareSerial on the new board I will try that later this week.

In addition I also bought an Uno and am not able to program to it, I suspect either a corrupt or missing bootloader, if this is the case that would make 2 out of 3 boards purchased with defects. Has anyone else had this kind of luck with arduino devices?

In addition I also bought an Uno and am not able to program to it

Why not? What happens when you try?

I suspect either a corrupt or missing bootloader

Why?

if this is the case that would make 2 out of 3 boards purchased with defects.

From whom?

Has anyone else had this kind of luck with arduino devices?

Once I understood what the computer was telling me, all 6 of my Duemilanoves, both my Megas, my netduino, my Teensy++2.0 and my Teensy3.0 all worked. So, no, I haven’t.

Why not? What happens when you try?

I get the following error after the upload completes.

avrdude: stk500_getsync(): not in sync: resp=0x86

Why?

After looking into it further I have doubt that this is the problem seeing as though I did not build nor flash the bootloader onto the device. But I was lead to this possible assumption by the following link: http://www.ladyada.net/learn/arduino/help.html

Most of the searches I did on this error were ones involving Mac OS and did not pertain to me because I am operating Windows 7.

From whom?

All three were from Radio Shack (two MEGA ADKs, one that I initially posted about that I could not get to work properly, which had the seal broken when I bought it, and the new one that I reciently bought that did work doing the same things that I was trying on the previous one, and one UNO that I am posting about now that comes up with the "avrdude: stk500_getsync(): not in sync: resp=0x86" error which did not have an open seal upon purchase)

Once I understood what the computer was telling me, all 6 of my Duemilanoves, both my Megas, my netduino, my Teensy++2.0 and my Teensy3.0 all worked. So, no, I haven't.

I am new to this, but I have tried searching this fault and 90% of the searches yeald a Mac OS problem which I don't think would apply to me seeing as though I am running Windows 7. I really haven't found any posts that I think directly relate to my situation.

I appreciate your help.

Another thing that I did find interesting was that when I looked into the properties on my Arduino IDE Ver.1.0.1 the latest Ver. of windows listed in the compatibility window was Vista SP 2, and Windows XP SP3 was defaulted. I tried Vista and Vista SP 2 to get a closer vintage to Windows 7 and I got the same result except the last 2 numerical digits in the error code would change. When I clicked the "Help me choose the correct version" button it chose Windows XP SP2, which also yielded the same error...

Open the Windows device manager and see if you don't have a Yellow Exclamation point next to an "Unknown Device", that will be the Arduino. Go to manual install and point it to the "Program Files (x86)\Arduino\Drivers" folder and it "Should" find and install the correct driver and fix the issue. I've bought or been given 2 Uno's, 2 Mini Pro's and 2 Mega's all of which work and most have required that step to make them work... Probably all but the first R3 Uno.

Bob

Bob,

The drivers for the Uno are properly installed. In the device manager under COM ports the uno is identified with no yellow exclaimation point next to it. It is assigned to COM port 5 which is what I am using to upload to it in the Arduino IDE.