Hello, after consulting the forum, I cannot find an explanation why we cannot read the GPS with the examples supplied with the device. I have connected the mkr gps shield to the mkr nb 1500 board using I2C ports. I have run the following program...
#include <Arduino_MKRGPS.h>
void setup() {
Serial.begin(9600);
while (!Serial) {
Serial.println("wait for GPS serial port to connect"); // wait for serial port to connect. Needed for native USB port only
}
// If you are using the MKR GPS as shield, change the next line to pass
// the GPS_MODE_SHIELD parameter to the GPS.begin(...)
if (!GPS.begin()) {
Serial.println("Failed to initialize GPS!");
while (1);
} else {Serial.println("Begin GPS ok");
}
}
void loop() {
// check if there is new GPS data available
// check if there is new GPS data available
do
{
if (GPS.available()) {
// read GPS values
float latitude = GPS.latitude();
float longitude = GPS.longitude();
float altitude = GPS.altitude();
float speed = GPS.speed();
int satellites = GPS.satellites();
// print GPS values
Serial.print(latitude, 7);
Serial.print(" ");
Serial.print(longitude, 7);
Serial.print(" ");
Serial.print(altitude);
Serial.print(" ");
Serial.print(speed);
Serial.print(" ");
Serial.print(satellites);
Serial.print(" ");
}
}
while(Wire.available());
}
AND THE RESULT IS GPS.available() is always false....making it impossible to use the device...