ArduinoGeneral

Sim808: Send GPS data by SMS to mobile

userHead Account cancelled 2017-07-25 09:38:32 984 Views2 Replies
Hi,
How to send by SMS, GPS data obtained with the function :

//************** Get GPS data *******************
if (sim808.getGPS()) {
Serial.print(sim808.GPSdata.year);
Serial.print("/");
Serial.print(sim808.GPSdata.month);
Serial.print("/");
Serial.print(sim808.GPSdata.day);
Serial.print(" ");
Serial.print(sim808.GPSdata.hour);
Serial.print(":");
Serial.print(sim808.GPSdata.minute);
Serial.print(":");
Serial.print(sim808.GPSdata.second);
Serial.print(":");
Serial.println(sim808.GPSdata.centisecond);
Serial.print("latitude :");
Serial.println(sim808.GPSdata.lat);
Serial.print("longitude :");
Serial.println(sim808.GPSdata.lon);
Serial.print("speed_kph :");
Serial.println(sim808.GPSdata.speed_kph);
Serial.print("heading :");
Serial.println(sim808.GPSdata.heading);
Serial.println();

//************* Turn off the GPS power ************
sim808.detachGPS();
}
Please, thank you.
2017-08-11 17:14:27 hschek2000:
take the gps parameters you want to report, snprintf() them to a char buffer, and send that buffer via SMS
userHeadPic hoerup1981
2017-08-01 15:24:28 You can combine the Get GPS data function with send SMS function, restore the GPS data as a message and send it to the mobile userHeadPic robert.chen