I currently have a module 808 .
My query is whether to get the GPS location with this module I just need to use the AT
commands, or I can use libraries like TinyGPS
.
I currently have this code:
#include <SoftwareSerial.h>
#include <TinyGPS.h>
long lat,lon;
SoftwareSerial SIM808(7, 8);
TinyGPS gps;
void setup(){
Serial.begin(19200);
SIM808.begin(19200);
Serial.print("GPS START");
}
void loop() {
gps.encode(SIM808.read());
gps.get_position(&lat, &lon);
Serial.print("Position: ");
Serial.print("lat "); Serial.prntln(lat);
Serial.print("lon "); Serial.prntln(lon);
delay(500);
}
But I can not get the coordinates right, and I do not know if it's because only with AT
commands work.