View Single Post
  #11   Spotlight this post!  
Unread 30-05-2013, 21:00
Mike Bortfeldt Mike Bortfeldt is offline
Registered User
FRC #1126 (& 1511)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2004
Location: Rochester, NY
Posts: 119
Mike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud ofMike Bortfeldt has much to be proud of
Re: Read a GPS through a Serial Port

Quote:
Originally Posted by androb4 View Post
Alternatively you can read the GPS data via the arduino's serial port, then send that data over I2C to the digital sidecar.
If you use I2C to communicate between the cRIO and Arduino, be sure to "setCompabilityMode(true)" on the I2c object otherwise you will probably experience sporatic communication failures. Also, there is a bug in the i2c.java code that treats all sent data bytes (cRIO to Arduino) as signed instead of unsigned (java doesn't have an unsigned byte), this causes it overwrite some bytes with a 255 (0xFF) when it combines the bytes into 32 bit integers prior to transmitting. This bug has been fixed for the next release of WPILib, but probably still resides in your code. You can fix this yourself if it becomes a problem.

Mike
Reply With Quote