Quote:
Originally Posted by JoshSmith
Quick note one this, it will take some modifications to get it to work (a "stock" Arduino Wire library will not work). And you can use an ethernet shield for your Arduino Uno if you want to get communications over ethernet working (this will still work with a RobotOpen shield if you ever want to add that).
Here is the relevant shield on sparkfun: http://www.sparkfun.com/products/9026
|
AFAIK we used the "stock" Arduino Wire library on this year's competition robot to communicate the shooter angular velocity with the cRIO.
We just had to use the
transaction method of the I2C class.
relevant part of our code:
Code:
UINT8 valuesGotten[2] = {0, 0};
I2CArduino->Transaction(NULL, 0, valuesGotten, 2);
UINT16 fullNumber = (valuesGotten[1] << 8) | valuesGotten[0];
Full code for reading our sensor is attached. I don't currently have access to the arduino side, though.