|
Re: I2C Arduino Port (Wii MotionPlus)
Thanks for all the help. We had moderate success tonight.
The biggest thing that we never would have figured out was the addressing. On the Arduino you have to initialize the Wii MotionPlus on 0x53. Then communicate with it on 0x52.
When switching to the cRio we initially were trying to initialize it at 0xa5 and then communicate with it on 0xa4. Thanks to your advice we figured out it needed to be 0xa6 and 0xa4.
We were having a load of problems with execution hanging at the Transaction call. After separating it out into 7 separate transactions. 1 write and 6 reads things smoothed out. Some additional searching on chief delphi leads us to believe that WPILib only supports reading or writing 4 bytes at a time. The comments in the source indicate 7 so that was mildly frustrating. At this point I think we have it working.
Provided we end up going this route once we get the code cleaned up and all the bugs worked out we hope to share our seemingly robust wrapper for the Wii MotionPlus with the rest of the first community.
Thanks Again!!!
Kyle
__________________
"May the coms be with you"
Is this a "programming error" or a "programmer error"?
|