I am trying to compile an example of tinyGPSPlus (same goes tinyGPS) for it works fine when i compile it using arduino IDE but when i use make upload there is no error but i don't receive any GPS data.
Please note that i have all ready uploaded functional programs using make upload.
The makefile i am using is : GitHub - ladislas/Bare-Arduino-Project: Start your Arduino projects right out of the box
tinyGPSPlus library can be found here: TinyGPS++ | Arduiniana
and the code :
#include <TinyGPSPlus.h>
#include <SoftwareSerial.h>
/*
This sample sketch demonstrates the normal use of a TinyGPS++ (TinyGPSPlus) 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).
*/
static const int RXPin = 3, TXPin = 2;
static const uint32_t GPSBaud = 4800;
// The TinyGPS++ object
TinyGPSPlus gps;
// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);
void setup()
{
ss.begin(GPSBaud);
Serial.begin(9600);
}
void loop()
{
while (ss.available() > 0)
if (gps.encode(ss.read()))
if (gps.location.isValid())
{
Serial.print("Location: ");
Serial.print(gps.location.lat(), 6);
Serial.print(",");
Serial.println(gps.location.lng(), 6);
}
}