Hello everypne! So the problem is:
I connect GPS receiver Beitian BN-880 to arduino mega 2560 pro board (as a standart scheme TX-RX3 RX-TX3 Vcc-5V and GND). Then I write Serial3.begin(9600)... so, standart code to read data, but, When I use kind of the same code on arduino nano, everything works fine, but with Mega2560 does not work at all....
This code is incorrect and it could not work on Nano.
With this line you are trying to extract GPS data from a single received letter, and when this obviously does not work - you do not save the received character in order to collect the complete line.
And yep, this string is from example of TinyGPSplusplus... The module send one string in NMEA protocole, and then library decodes it and makes calculations...
It is not true, look to the example more closely. To extract a GPS data from the message you need to work with a full string rather than with a single char.
I connect power suply- 5 Volts and ground. We have TX led on module flashing, and PPS flashes too.
2)I connect RX and TX pins. From this point TX led stops flashing, and we have no data streaming from module (even raw data streaming )...
Maybe there is some code to enable serial port number 3 on Mega2560
That is actually correct, the library is fed one character at a time, and stores the characters in its own buffer. When a complete, valid NMEA sentence has been received, the encode() function returns TRUE, otherwise it returns FALSE.
Something to be careful of, the Beitian BN-880 information that I can find shows the Rx/Tx as 3.3V logic, that might cause problems with the Tx line from the Arduino.
If you connect only +5v, GND, and the GPS Tx > Mega Rx3, leaving the Mega Tx3 disconnected, do you see the NMEA data in the serial monitor with the following sketch?
The examples using software serial all seem to assume this:
" It requires the use of SoftwareSerial, and assumes that you have a
4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx)."
Your sketch sets Serial 3 at 9600 baud. Did you try changing
So, without having this GPS module and assuming the variable FPLNNum is an int (I don't know what it does in your sketch), I took one of the library examples and cobbled it together with yours and came up with this. If you find it useful, happy days, if not or if it doesn't work (I can't test and troubleshoot from here), sorry.
Good luck