Hi guys
I´m using an Arduino Uno with this gps shield(ftp://imall.iteadstudio.com/IM120417017_Arduino_GPS_shield/DS_IM120417017_ArduinoGPSshield.pdf) and using the code of the simple test, with this configuration exactly:
#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 ss(3, 2);
void setup()
{
Serial.begin(115200);
ss.begin(4800);
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);
}
with the jumpers going to the "hole" 3(abov the rx pins) and and rxd 3 and from the pin 2(between rx and tx) to the txd 2.
But I´m only getting this print:
Simple TinyGPS library v. 12
by Mikal HartCHARS=47 SENTENCES=0 CSUM ERR=0
CHARS=81 SENTENCES=0 CSUM ERR=0
CHARS=115 SENTENCES=0 CSUM ERR=0
CHARS=150 SENTENCES=0 CSUM ERR=0
CHARS=185 SENTENCES=0 CSUM ERR=0
CHARS=220 SENTENCES=0 CSUM ERR=0
CHARS=255 SENTENCES=0 CSUM ERR=0
CHARS=290 SENTENCES=0 CSUM ERR=0
CHARS=325 SENTENCES=0 CSUM ERR=0
CHARS=360 SENTENCES=0 CSUM ERR=0
CHARS=395 SENTENCES=0 CSUM ERR=0
CHARS=430 SENTENCES=0 CSUM ERR=0
CHARS=465 SENTENCES=0 CSUM ERR=0
CHARS=500 SENTENCES=0 CSUM ERR=0
CHARS=535 SENTENCES=0 CSUM ERR=0
CHARS=570 SENTENCES=0 CSUM ERR=0
CHARS=605 SENTENCES=0 CSUM ERR=0
CHARS=640 SENTENCES=0 CSUM ERR=0
CHARS=675 SENTENCES=0 CSUM ERR=0
CHARS=710 SENTENCES=0 CSUM ERR=0
CHARS=745 SENTENCES=0 CSUM ERR=0
CHARS=780 SENTENCES=0 CSUM ERR=0
CHARS=815 SENTENCES=0 CSUM ERR=0
CHARS=850 SENTENCES=0 CSUM ERR=0
CHARS=885 SENTENCES=0 CSUM ERR=0
CHARS=920 SENTENCES=0 CSUM ERR=0
CHARS=955 SENTENCES=0 CSUM ERR=0
CHARS=990 SENTENCES=0 CSUM ERR=0
CHARS=1025 SENTENCES=0 CSUM ERR=0
at 115200 baud rate.
Anyone has any idea what is wrong with my test???