So, then this is the correct pin layout?
static const int GPS_RXPin = A1;
static const int GPS_TXPin = A0;
static const int GPS_RXPin = A1;
static const int GPS_TXPin = A0;
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
/*
This sample code demonstrates the normal use of a TinyGPS++ (TinyGPSPlus) object.
*/
static const int GPS_ONOFFPin = A3;
static const int GPS_SYSONPin = A2;
static const int GPS_RXPin = A0;
static const int GPS_TXPin = A1;
static const int GPSBaud = 9600;
// The TinyGPS++ object
TinyGPSPlus gps;
// The serial connection to the GPS device
SoftwareSerial ss(GPS_RXPin, GPS_TXPin);
void setup()
{
Serial.begin(115200);
// Init the GPS Module to wake mode
pinMode(GPS_SYSONPin, INPUT);
pinMode(GPS_ONOFFPin, OUTPUT);
digitalWrite( GPS_ONOFFPin, LOW );
delay(5);
if( digitalRead( GPS_SYSONPin ) == LOW )
{
// Need to wake the module
digitalWrite( GPS_ONOFFPin, HIGH );
delay(5);
digitalWrite( GPS_ONOFFPin, LOW );
}
ss.begin(GPSBaud);
}
void loop()
{
while (ss.available())
if (gps.encode(ss.read()))
{
Serial.print(F("Location: "));
Serial.print(gps.location.lat(), 6);
Serial.print(F(","));
Serial.print(gps.location.lng(), 6);
}
if (millis() > 5000 && gps.charsProcessed() < 10)
{
Serial.println(F("No GPS detected: check wiring."));
while(true);
}
}