![]() |
Read a GPS through a Serial Port
Hi Chief Delphi Community!
For a separate robotics competition (The Sparkfun Autonomous Vehicle Competition, if you were wondering) we are using the FRC control system. For the competition we have to autonomously navigate a course and race other robots around a parking lot, and we aim to do so by using GPS. We have a working GPS chip on an Arduino system that can output to a serial port, and so we would like to use the one on the cRIO to get the data. We have verified the chip can output the correct data using other software, but when we try to read it from the code, we get a bunch of nonsense. The baud rate is correct, so we don't know why we are getting this data. Any help is appreciated! Thanks! -Katy Code:
|
Re: Read a GPS through a Serial Port
Is the console out switch on the cRIO off? Make sure the cRIO isn't imaged with the serial CAN plugin.
What serial levels does the arduino serial port use? Many microcontrollers use TTL levels, which violate the RS-232 spec. You'd need a level converter like the MAX232 to use it with the cRIO. If you post the gibberish and an example of what the GPS sends, someone might be to make sense of it. |
Re: Read a GPS through a Serial Port
Yea it's most likely that you need a logic level converter as stated above, because its working on a arduino which uses TTL.
|
Re: Read a GPS through a Serial Port
The console out switch is off. I don't have the data with me now but the next time we meet I can try posting some output. You're probably right about the TTL thing, thanks! I will look into that.
|
Re: Read a GPS through a Serial Port
BTW, most GPS modules output in serial in NEMA format anyway so using an arduino seems kind of unnecessary.
|
Re: Read a GPS through a Serial Port
This bug report suggests that the Serial port in Java is broken:
http://firstforge.wpi.edu/sf/go/artf...3699545405 50 |
Re: Read a GPS through a Serial Port
Quote:
|
Re: Read a GPS through a Serial Port
I know there have definitely been updates since January 20, but I don't remember seeing anything about Serial Ports. If that's the case then this may all be a lost cause, even with a converter...
|
Re: Read a GPS through a Serial Port
Quote:
|
Re: Read a GPS through a Serial Port
Quote:
|
Re: Read a GPS through a Serial Port
Quote:
Mike |
Re: Read a GPS through a Serial Port
Quote:
|
Re: Read a GPS through a Serial Port
Quote:
Not being able to clear the read buffer makes the serial port quite useless. Any imput data just continues to stack up. So every time you read you get a complete history of the past data. I tihnk you could recompile the source locally to fix the problem. I didn't have a lot of data to send, I just used a bunch of relay channels for the signals I needed to send. It would be really nice to have a useable RS232 port though in the future. |
Re: Read a GPS through a Serial Port
Updated serial port files were just attached to the bug report in FIRST Forge.
|
| All times are GMT -5. The time now is 09:59. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi