Hello, I'm having a lot of trouble using the TinyGPS++ library with the MKR GSM 1400. I understand that the MKR does not have software serial capabilities so I've been trying to get the library to work using hardware serial. Here is my code, but when I connect it properly I don't get output. I tested it with a Nano and it worked:
#include <TinyGPS++.h>
//Initialize TinyGPS++ object
TinyGPSPlus gps;
void setup() {
//while (!Serial);
Serial.begin(115200);
}
void loop() {
while (Serial.available() > 0)
if (gps.encode(Serial.read()))
if (gps.location.isValid())
{
Serial.print(gps.location.lat(), 6);
Serial.print(", ");
Serial.print(gps.location.lng(), 6);
Serial.println("");
delay (1000);
}
}