Go Down

Topic: Arduino GPS Shield by iteadstudio.com (Read 39 times) previous topic - next topic

numb3rs295


still no results after 20 minutes..this is what i get:

GPS Shield QuickStart Example Sketch v12
       ...waiting for lock...     

is there anything to do with rx and tx pin? because both led in my arduino didn't turn on at all (if that is anything to do with this)

from my understanding of this webpage (http://arduino.cc/en/Reference/SoftwareSerial), if i used software serial i need to use pin other than 2 and 3, since "Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69" (quote from the web)

but i've changed 10 and 11 instead of 2 and 3, but still no effect...



the code you're using is for the GPS shield by iteadstudio.com
you're using another shield, try this code :
Code: [Select]
/*
  6-8-10
  Aaron Weiss
  SparkFun Electronics
 
  Example GPS Parser based off of arduiniana.org TinyGPS examples.
 
  Parses NMEA sentences from an EM406 running at 4800bps into readable
  values for latitude, longitude, elevation, date, time, course, and
  speed.
 
  For the SparkFun GPS Shield. Make sure the switch is set to DLINE.
 
  Once you get your longitude and latitude you can paste your
  coordinates from the terminal window into Google Maps. Here is the
  link for SparkFun's location. 
  http://maps.google.com/maps?q=40.06477,+-105.20997
 
  Uses the NewSoftSerial library for serial communication with your GPS,
  so connect your GPS TX and RX pin to any digital pin on the Arduino,
  just be sure to define which pins you are using on the Arduino to
  communicate with the GPS module.
 
  REVISIONS:
  1-17-11
    changed values to RXPIN = 2 and TXPIN = to correspond with
    hardware v14+. Hardware v13 used RXPIN = 3 and TXPIN = 2.
 
*/

// In order for this sketch to work, you will need to download
// TinyGPS library from arduiniana.org and put them
// into the hardware->libraries folder in your ardiuno directory.
#include <SoftwareSerial.h>
#include <TinyGPS.h>

// Define which pins you will use on the Arduino to communicate with your
// GPS. In this case, the GPS module's TX pin will connect to the
// Arduino's RXPIN which is pin 3.
#define RXPIN 2
#define TXPIN 3
//Set this value equal to the baud rate of your GPS
#define GPSBAUD 4800

// Create an instance of the TinyGPS object
TinyGPS gps;
// Initialize the NewSoftSerial library to the pins you defined above
SoftwareSerial uart_gps(RXPIN, TXPIN);

// This is where you declare prototypes for the functions that will be
// using the TinyGPS library.
void getgps(TinyGPS &gps);

// In the setup function, you need to initialize two serial ports; the
// standard hardware serial port (Serial()) to communicate with your
// terminal program an another serial port (NewSoftSerial()) for your
// GPS.
void setup()
{
  // This is the serial rate for your terminal program. It must be this
  // fast because we need to print everything before a new sentence
  // comes in. If you slow it down, the messages might not be valid and
  // you will likely get checksum errors.
  Serial.begin(115200);
  //Sets baud rate of your GPS
  uart_gps.begin(GPSBAUD);
 
  Serial.println("");
  Serial.println("GPS Shield QuickStart Example Sketch v12");
  Serial.println("       ...waiting for lock...           ");
  Serial.println("");
}

// This is the main loop of the code. All it does is check for data on
// the RX pin of the ardiuno, makes sure the data is valid NMEA sentences,
// then jumps to the getgps() function.
void loop()
{
  while(uart_gps.available())     // While there is data on the RX pin...
  {
      int c = uart_gps.read();    // load the data into a variable...
      if(gps.encode(c))      // if there is a new valid sentence...
      {
        getgps(gps);         // then grab the data.
      }
  }
}

// The getgps function will get and print the values we want.
void getgps(TinyGPS &gps)
{
  // To get all of the data into varialbes that you can use in your code,
  // all you need to do is define variables and query the object for the
  // data. To see the complete list of functions see keywords.txt file in
  // the TinyGPS and NewSoftSerial libs.
 
  // Define the variables that will be used
  float latitude, longitude;
  // Then call this function
  gps.f_get_position(&latitude, &longitude);
  // You can now print variables latitude and longitude
  Serial.print("Lat/Long: ");
  Serial.print(latitude,5);
  Serial.print(", ");
  Serial.println(longitude,5);
 
  // Same goes for date and time
  int year;
  byte month, day, hour, minute, second, hundredths;
  gps.crack_datetime(&year,&month,&day,&hour,&minute,&second,&hundredths);
  // Print data and time
  Serial.print("Date: "); Serial.print(month, DEC); Serial.print("/");
  Serial.print(day, DEC); Serial.print("/"); Serial.print(year);
  Serial.print("  Time: "); Serial.print(hour, DEC); Serial.print(":");
  Serial.print(minute, DEC); Serial.print(":"); Serial.print(second, DEC);
  Serial.print("."); Serial.println(hundredths, DEC);
  //Since month, day, hour, minute, second, and hundr
 
  // Here you can print the altitude and course values directly since
  // there is only one value for the function
  Serial.print("Altitude (meters): "); Serial.println(gps.f_altitude()); 
  // Same goes for course
  Serial.print("Course (degrees): "); Serial.println(gps.f_course());
  // And same goes for speed
  Serial.print("Speed(kmph): "); Serial.println(gps.f_speed_kmph());
  Serial.println();
 
  // Here you can print statistics on the sentences.
  unsigned long chars;
  unsigned short sentences, failed_checksum;
  gps.stats(&chars, &sentences, &failed_checksum);
  //Serial.print("Failed Checksums: ");Serial.print(failed_checksum);
  //Serial.println(); Serial.println();
}


hope you it works ..

troyka_4484

I don't think I can help more   :~
but an advice, make sure that you're using your GPS outdoors, and that you're GPS have a clear view to the open sky!

george_seban

hai
as a biginer i am not having much idea about the initial settings required for the operation of GPS module (itead studio gps shield v1.1).
so could you please provide me the idea related to it...

chris4775

Hello, I return on this excellent post and "only one" article on this GPS  which I have just bought. I had difficulty to make it speak and it is thanks to you and especially to Paul that I heard the soft music of wefts come from the sky!!! Ouahh
I shall wish to make two observations and to put two questions.
Obs1: on a deck UNO, it is necessary to use pines 0 and 1 otherwise it do not work. P1=Rx; P2=Tx.
Obs2; it is impossible to download the shetch (all IDE) without creating of fault if pines 1 and 0 are connected. It is necessary to disconnect pine 0 and the download can take place. Mystery!! see pj
Question1: it is impossible to use the exitsI2C. I do not know why but it is boring to connect a LCD. What's going on?
Question2; I implemented the part necessary for the recording on SD by following the only usable link and offert:Gs_logger. I was not "thrown" but I did not know how to write the program.
Can you advise to me there above?
I made another sketch work which allows the employment of a LCD 12x2 and a display  delayed a part of wefts. I wait for one 20x4 to make better.
If it interests somebody!!!

I am French and it is mister Google who made the translation !!! Sorry !!!
Thank you

Nataly

Greetings, troyka 4484 and Paul'S. My name is Nataly from Venezuela.

I have the same gps shield by ITEAD STUDIO ver 1.1.

my question is:

in this image, where i have to put the correct jumper tx & rx ?



thanks for any help...
You can do it, If you want!

Go Up