GPS NMEA string not read by UNO

I have confirmed the raw sentence from my GPS module is displayed on the serial monitor OK. When I use any of the numerous programs shown on YouTube and get the code to compile and load, the UNO doesn't display the result I know is there. What am I doing that is causing a common failure? Thank you for any help.

Connect the GPS TX pin to the Arduino RX pin, and the GPS RX pin to the Arduino TX pin?

TX to TX will pass through to the serial monitor, but Arduino sketches won't work that way.

Be sure to look at the troubleshooting tips for my NeoGPS library. It's also available from the Arduino IDE Library Manager, under the menu Sketch -> Include Library -> Manage Libraries.

It has a diagnostic program, correctly structured examples, and it's smaller, faster and more accurate than all other libraries.

Cheers,
/dev

Hi dev

Thank you. Can’t wait to try this and will respond with results.

Just to make sure I’m understanding your instruction, I am hooking the GPS Rx and TX to ports like 10 and 11 or 2 and 3 and then identifying them with statements in the code. Then I try to read the string from there with instructions in the code. Is this what you understand? Thank you! JBB

hr2guy:
I am hooking the GPS Rx and TX to ports like 10 and 11 or 2 and 3 and then identifying them with statements in the code.

For best results, connect the GPS TX to Arduino pin 8, and the GPS RX to Arduino pin 9 (see warning below!), and use the AltSoftSerial library to use those pins as a software serial port (NOT SoftwareSerial).

#include <AltSoftSerial.h>
AltSoftSerial gpsPort; // must be on pins 8 & on an UNO

If your GPS device is a 3.3V module, DO NOT connect the Arduino pin 9 to the GPS RX (reasons here). It can damage the device. You only need to connect it if you want to send configuration commands to the GPS device

It is ok to connect a 3.3V GPS TX to the Arduino pin 8, but it may not be reliable.

For proper use, you must “level shift” the 3.3V signals to/from the 5V signals. A level shifting module is best, but you can also use a few resistors/diodes (diagram here).

Then I try to read the string from there with instructions in the code.

If you’re using NeoGPS, you just do this:

void setup()
{
  Serial.begin( 9600 );
  gpsPort.begin();
}

void loop()
{
  while (gps.available( gpsPort )) {
    gps_fix fix = gps.read();

    if (fix.valid.location) {
      Serial.print( fix.latitude(), 6 );
        ...