Other Parts Discussed in Thread: ENERGIA
Hello there,
I connected a gps module and it gives me the gps data but im unable to segregate the following data on energia
+QGNSSRD: $GNRMC,044927.000,A,1301.7816,N,07731.3016,E,0.00,93.73,290319,,,A*4F
so i need to separate the latitude and longitude, time and date.
So can anybody help me in understanding how to get the required data from the above.
i attached my code below as you can see im getting stuck in the serial read please help me in correcting this.
char gps;
int times = 1;
int count = 0;
void setup()
{
Serial.begin(115200);
delay(2000);
Serial.println("AT");
delay(1000);
//Serial.println("AT+CMGF=1");
Serial.println("AT+QGNSSC?");
delay(1000);
Serial.println("AT+QGNSSC=1");
delay(1000);
Serial.println("AT+QGNSSTS?");
delay(1000);
}
void loop() {
while(count < times)
{
Serial.write("AT+QGNSSRD=\"NMEA/RMC\"");
delay(2000);
if(Serial.available() >0)
{
gps=Serial.read();
String response = "";
response +=gps;
Serial.println(response);
return response;
}
count++;
}
}



