Hello, I am using a GPS shield with an arduino Mega2560, not mounted on the board because it doesn't fit completely, but wired to the power (5V, 3.3V and GND), and the pin2 connected to the pin15 (RX3) of the Mega2560 with the UART/DLINE switch set to DLINE(indifferently, when I connect it to the RX pin and set it to UART it still gives me the strange readings).
I am using the TinyGPS library, but the encode function does not work, and trying to figure out what was happening, I printed the readings directly from the port, noticing that mine are way differente from the ones I have found in more than one site. Like the ones shown here.
I assume that the encode function doesn't work because it does not "understand" the readings it is getting from the port. You can see them in the attached image.
Any idea why is this happening and how can I solve it? Or is the module just not working?
There are two errors in this line. Number one: you use print() to write the read character which will print it's ASCII representation and not the character itself (so if the GPS sends a space, it prints 32). Number two: the Serial3.read() consumes the character, so the next Serial3.read() will return the character after the one you printed to the debugging serial port.
Post your sketch within code tags and don't just attach a screen shot. Additionally you should provide links to the hardware you used and to all libraries not included in the standard IDE.