MKR NB 1500 IoT with MKR GPS Shield

Hi,

I've recently got hands on a MKR NB 1500 and a MKR GPS shield to send GPS coordinates to the Arduino IoT cloud.

After trying and searching a lot of similar topics, this still doesn't work. Sending random values to the Arduino IoT Cloud (without GPS) works, aswell as the GPS side itself, without the IoT part.
As soon as I try to make a connection to the IoT, the GPS connection is gone.

Does anyone have found a solution yet?

I've tried:

  • IoT test (working)
  • GPS test with MKR GPS sketch (working)
  • GPS test with SparkFun uBlox GNSS library (working)
  • IoT + MKR GPS library (IoT is working, but GPS data is not available)
  • IoT + SparkFun uBlox GNSS library (IoT is working, but GPS data is faulty)
  • Wire added and speed adjusted to 400000 (does not make a difference, still not working)

Thanks in advance!

To all who runs into the same problem, apparently timing the ArduinoCloud.update(); to 1 second is the way to go.

unsigned long time_now = 0;
int period = 1000;

void loop() {
if(millis() >= time_now + period){
    time_now +=  period;
     ArduinoCloud.update();
  }
  }
1 Like

Thank you for this advice.
I still had to #include <Wire.h> and changed the part with ArduinoCloud.update(); to

  if (millis() >= time_now + period){
    time_now +=  period;
    ArduinoCloud.update();
    Wire.setClock(400000);
  }
1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.