Hello, I want to get GPS location information with nRF52840, I use UART protocol at 9600 baud rate, but I cannot read the data regularly, how should I do?
Hello, I want to get GPS location information with nRF52840, I use UART protocol at 9600 baud rate, but I cannot read the data regularly, how should I do?
Hi,
Berkay Dudu said:When the code added the line "flow_control = APP_UART_FLOW_CONTROL_DISABLED" and changed the location of the pins on the board, the data came in this way, but upload different codes and the same data is coming
If flow control is enabled then you have to connect RTS and CTS pins in addition to TX and RX, if not then the UART transmission will not start.
What pins were you using and which pins did you switch to, are you using a development kit?
Berkay Dudu said:but upload different codes and the same data is coming. How can I control the future and how can I filter it?
I'm not sure I understood this question, can you elaborate?
regards
Jared
Yes i am using nrf52840 kit. For example
How do I split data read as $GPGGA, 123519, 4807,038, N, 01131,000, E, 1.08, 0.9, 545.4, M, 46.9, M,, *47
Hi,
The GPGGA has a specific format, where you can expect that each filed in the format is separated by a ","
The format is:
You can use strcmp() to compare two strings, it will return a 0 if the two strings are alike. You can use this to filter the incoming data since you know the format of it.
regards
Jared
For example, can I get the latitude or longitude information with the strcmp command?
Hi,
You can use it to filter out data, you can use it to compare each field in the GPGGA format to your UART RX buffer.
regards
Jared