Arduino Zero Wii Nunchuck

Hi All,

We have been working with Arduino Zero and a Nunchuck and found that the WiiChuck library does not work with the Arduino Zero. When connected, the nunchuck reads maximum on all channels (Joystick X/Y = 255, Accel X/Y/Z = 1023, buttons = 0), but occasionally 5 instances of random data are received. We found that this was a timing issue; the Nunchuck remains busy for a period after the read request, and misses a write request from the arduino.

Below are a few details for reference regarding the Nunchuck and the Arduino Zero, to save people some time on finding it out themselves.

Quick Points
The arduino communicates to the Nunchuck over I2C (addr = 0x52)
The arduino initialises the Nunchuck by sending 2 bytes (0x40, then 0x00)
The arduino reads 6 bytes from the Nunchuck, it then writes a byte of 0 (0x00)

Important
There must be a delay of at least 5ms between the read (6 byte read) and the write (1 byte of 0)

5 millisecs sounds like a lifetime - some mistake, surely

...R