Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No GPS reading on Arduino Uno R3 #6

Open
sunekaae opened this issue Oct 13, 2017 · 1 comment
Open

No GPS reading on Arduino Uno R3 #6

sunekaae opened this issue Oct 13, 2017 · 1 comment

Comments

@sunekaae
Copy link

I was not able to get any GPS readings. I am using:
CAN-BUS Shield (DEV-13262) and GPS Receiver
EM-506 (GPS-12751) ordered bis SK Pang
Arduino Uno R3

Looking at the hookup guide, it actually seems that the author was also not able to get a GPS fix, The author suggested the reason was poor GPS connection, but perhaps it's actually the code. Looking through the code it seems to me that it will not work on Arduino Uno with software serial, because it does too many other things including delays to be able to read the incoming data from the serial GPS module.
https://learn.sparkfun.com/tutorials/can-bus-shield-hookup-guide

@sunekaae
Copy link
Author

I have reorganized the code such that:

  • using "while" instead of "if" for the uart_gps.available() check
  • moving the uart_gps.available() to the top of the loop and ensuring that other code only runs once a second, ensures that there's time to read the incoming serial GPS data

I have not done substantial rewrite or refactor, rather just reorganized what already exists and tweaked it to get the GPS to work

Here's the reorganized code:
https://github.com/sunekaae/SparkFun_CAN-Bus_Arduino_Library/tree/fix-gps-on-ecu-demo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant