|
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
|