Good Colleagues, I have a project where I send my coordinates to a database in Mysql, I use the SIM808, which brings for GPS / GSM. The idea is to be sending coordinates to the server through the GET method
The problem I have is that I call the following function in the loop
void enviarDatos(){
String id = "456789";
Serial.println(lat+" "+lon+" "+id);
myGsm.println("AT+HTTPPARA=URL,http://miServer/getArduino.php?latitud="+lat+"&longitud="+lon+"&dispositivo="+id);
delay(1000);
printSerialData();
myGsm.println("AT+HTTPACTION=0");
delay(500);
printSerialData();
}
When doing this process in the Loop, it should be repeated until the end of the days, but what happens is that sometimes it only sends me latitude, or longitude, and sometimes it gives me the incomplete coordinates, and if we leave it more time you start to combine all the instructions, to the point that you do not even send the data
I wanted to know if anyone has any kind of suggestion, I do not know if I will have to do some kind of FLush every so often, because it seems that it mixes previous data with the new ones.
Thanks for any contribution, Regards