Hello Particle Forum,
I’m trying to get data from the Google Maps Integration to be sent to my device so I can display it to a screen.
However, during the tutorial, I’m not seeing the Coordinates come up on Particle Console, Or my serial monitor.
This integration is added as part of a Product (If that makes a difference)
I’m a bit confused, everything seems to be in order, but I don’t seem to be receiving any GPS data.
In the in tutorial, it shows GPS coordinates coming right over the event log.
Is there something I’m missing that is stopping that from happening?
Thanks!
Here’s my code
#include "google-maps-device-locator.h"
GoogleMapsDeviceLocator locator;
void setup() {
Serial.begin(9600);
locator.withSubscribe(locationCallback).withLocatePeriodic(120);
}
void locationCallback(float lat, float lon, float accuracy) {
String Coordinates;
Coordinates = String::format("{\"lat\":%f,\"lon\":%f,\"accuracy\":%d}", lat, lon, accuracy);
Serial.print("Sending Coordinates : ");
Serial.println(Coordinates);
}
void loop() {
locator.loop();
}
Here’s my event log;
And here’s the Particle Console Integration monitor It showing every thing working smoothly.