View Single Post
  #7   Spotlight this post!  
Unread 12-06-2013, 19:14
Secretspy97 Secretspy97 is offline
Registered User
FRC #1126
Team Role: Programmer
 
Join Date: Oct 2011
Rookie Year: 2009
Location: New York
Posts: 25
Secretspy97 is an unknown quantity at this point
Re: Use Sidecar I2C port to communicate with Arduino?

We used an Arduino on our robot, this year, to give us very accurate gyro readings and to control LED's on the robot. We program in java on the cRIO and at first had trouble. It turns out that the cRIO is not defaulted to transfer I2C data correctly because we would receive fault values followed by a correct value. To fix this issue we added the line:
private static I2C i2c = digitalSidecar.getI2C(4);
i2c.setCompatabilityMode(true);
to our startup code.
This solved our main problem and data was reliable recieved/sent after that,
__________________
WHAT TIME IS IT?
1126