Hello to all Members !
This is my very first post here so please excuse me for making mistakes .
I am a hobbyist electronics technician and i recently started learning C language in order to be able to materialise small projects with Arduino.
I need guidance concerning a project im working on.
The project involves an arduino uno and two gps receiver units.
What i want to do is use the arduino to read the serial output of the two gps units then do some calculations and then turn on or off some leds.
The gps units transmit serial data NMEA.
The data string on Hyperterminal looks like this :
$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,47
$GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.139
$GPGSV,2,1,08,01,40,083,46,02,17,308,41,12,07,344,39,14,22,228,45*75
Just for the record here is a link that explains in detail what the above strings are about:
https://www.gpsinformation.org/dale/nmea.htm
what i want the arduino to do is read the below string (sentence) and ignore the rest.
$GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39
Before i decide to turn to Arduino i used Pixace a little bit and i was able to do this by using these bits ( GSA ) as a qualifier and store all rest bits for later calculations ,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39
further more i need the serial to "timeout" if this ( GSA ) string is not transmitted for a period longer than 1 second.
The reason for the above is that first i only need the GSA sentence while i dont want my Microcontroller to "hang" waiting to receive this sentence (or any other) if the GPS unit is not connected.
After doing some research i came up empty about the "qualifier" while i found something about the timeouts and that was Stream.setTimeout() and Serial.readBytesUntil()
THANK YOU !!!