View Single Post
  #2   Spotlight this post!  
Unread 03-02-2014, 09: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: I2C Arduino Port (Wii MotionPlus)

Kyle,

I'll take a shot at this. My experience is with I2C in Java and an Arduino, but most of that should apply here. First, if you are using an address of 0x52 on an Arduino to communicate with the Wii MotionPlus, then you will most likely need to use an address of 0xA4 on the cRio. Your code doesn't show how you are setting up the I2C object. For the "receiveing data" portion, you should be able to use the following code to just receive data.

Code:
_wmp->Transaction(0x00, 0, buffer, sizeof(buffer));
The zero length of the send buffer will prevent the cRIO from transmitting any data. As for the sending without any address, the register address typically is the first byte in the transmission string. It is all up to the Wii MotionPlus on how it interprets the data it receives, so this should not be a problem.

Mike

Last edited by Mike Bortfeldt : 03-02-2014 at 09:16. Reason: incorrect address
Reply With Quote