Hi Guys,
this is just part of the sketch GPSlocation.ino from arduino
I created variable called Location ...
void loop() {
ArduinoCloud.update();
// Your code here
// check if there is new GPS data available
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("Location: ");
Serial.print(latitude, 7);
Serial.print(", ");
Serial.println(longitude, 7);
Serial.print("Altitude: ");
Serial.print(altitude);
Serial.println("m");
Serial.print("Ground speed: ");
Serial.print(speed);
Serial.println(" km/h");
Serial.print("Number of satellites: ");
Serial.println(satellites);
Serial.println();
}
}
/*
Since Location is READ_WRITE variable, onLocationChange() is
executed every time a new value is received from IoT Cloud.
*/
void onLocationChange() {
// Add your code here to act upon Location change
}
I need help to create map widget from latitude , longitude in arduino cloud