sidwarkd / gp20u7_arduino

A simple Arduino library for the GP20U7 GPS unit
4 stars 5 forks source link

GP-20u7 not outputting Lat/Long #3

Closed Donovator122 closed 3 years ago

Donovator122 commented 5 years ago

Hello, I have downloaded the library and code for the gp20u7. I have the GPS wired as instructed. I am using an arduino mega. I have found that before uploading I must unplug the TX wire from the GPS, then plug it in once it uploads. I am receiving 0.00000 for both latitude and longitude. I have let it sit outside to see if it would connect easier, still no luck. Im sure it is something simple that I am not seeing Thank you, Donovan

GP20u7.ino.zip

sidwarkd commented 5 years ago

Hey Donovan, Just sat down to this. Did you get it figured out?

Donovator122 commented 5 years ago

I was able to get it to output, however it does not occur 100% of the time. I am unsure what order to use when downloading. I currently unplug the rx pin, download, open serial moniter 9600, the plug in the rx pin. I am trying to incorporate this into a larger program that writes to the sd card, I commented out all the other functions and added a beep so that I know if it finds values, Is there a step that should be added? Thank you for the response

Altimeter_GYRO2SD.ino.zip

sidwarkd commented 5 years ago

On the Arduino Mega it might be better for you to use Serial1 for the GPS since you are also using generic Serial to write to the USB output. To do that you would plug the TX pin of the GPS unit to pin 19 of the mega which is the Serial1 RX pin. Then you would initialize like:

GP20U7 gps = GP20U7(Serial1);
gps.begin();

Separating the GPS unit like that from your other serial stuff is recommended. Give that a try and let me know if you are still having issues.