mikalhart / TinyGPSPlus

A new, customizable Arduino NMEA parsing library
http://arduiniana.org
1.05k stars 486 forks source link

Tiny gps not reading #91

Closed Max1092 closed 2 years ago

Max1092 commented 3 years ago

hello I am attempting to use the simple test example on the tiny gps library but I am having an issue with it working. I am using a mega 2560 with a Neo 6m gps module. I have the rx and tx pins connected to 19 and 18 respective but whenever I try to pull data on the serial monitor I just get this error No characters received from GPS: check wiring CHARS=0 SENTENCES=0 CSUM ERR=0 I have triple checked the wiring and its correct along with the baud rate, I changed the code so pins 18 and 19 are correct and the baud rate to 9600 but I can't seem to get it to work, I'm hoping you might have some insight as I have been trying to get this to work for weeks now and cannot figure it out. thanks

mikalhart commented 3 years ago

Hi.

99% of errors like this are either

a. Wiring mismatch. Try hooking GPS.TX to Arduino.RX and GPS.RX to Arduino.TX. (If you’re already doing that, try it the other way: TX-TX, RX-RX). b. Using wrong serial port in code. You should be using Serial1 instead of SoftwareSerial if you’re using the Mega 2560’s actual (second) serial port.

Hope this helps…!!

Mikal

From: Max1092 @.> Sent: Wednesday, June 16, 2021 4:14 PM To: mikalhart/TinyGPSPlus @.> Cc: Subscribed @.***> Subject: [mikalhart/TinyGPSPlus] Tiny gps not reading (#91)

hello I am attempting to use the simple test example on the tiny gps library but I am having an issue with it working. I am using a mega 2560 with a Neo 6m gps module. I have the rx and tx pins connected to 19 and 18 respective but whenever I try to pull data on the serial monitor I just get this error No characters received from GPS: check wiring CHARS=0 SENTENCES=0 CSUM ERR=0 I have triple checked the wiring and its correct along with the baud rate, I changed the code so pins 18 and 19 are correct and the baud rate to 9600 but I can't seem to get it to work, I'm hoping you might have some insight as I have been trying to get this to work for weeks now and cannot figure it out. thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mikalhart/TinyGPSPlus/issues/91 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AAD3BWD4XJWXIHDTJCSBYKTTTEHYHANCNFSM462I2RJQ . https://github.com/notifications/beacon/AAD3BWAZIL6YJSGYRVNLISLTTEHYHA5CNFSM462I2RJ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4NYFRPFA.gif

Jorin-Post commented 2 years ago

If you have a new GPS model it takes some time to get data. I let it run for a half hour and still not all the raw data was filled. I hope you already figured it out.

mikalhart commented 2 years ago

@Jorin-Post Quite right, but well before you get a fix you would expect to see characters flowing immediately. @Max1092 reports "CHARS=0". Actually on closer reading I see that Max's wiring is likely wrong: "rx and tx pins connected to 19 and 18". Should be the other way around.