Hi,
I'm trying to use the arduino as an expansion for the wiimote. For starters I want to emulate a Nunchuk on a Arduino mega.
So to get things going I
-
Accessed the Nunchuck directly from the Arduino. Thats a fairly basic task and worked out of the box.
Connect the Nunchuck (Nintendo original wired) via I2C.
Setup Communication via slave address 0x52 and everything works.
I confirmed the encrypted com using
0x40:0x00 and the well known 0x17 decoding function.
Additionaly I tried encryptenless com via
0xF0:0x55, 0XFB:0x00 which also worked, though I still dont quite understand what the second write is supposed to do. The nunchuck does behave exactly the same without this step and I cant find any difference the registers. -
I used the wiiuse-library on my pc to access the wiimote and simulated a nunchuk on my arduino.
The library uses encrypted com. and after a few tries I succeeded in sending calibration data and the 6-byte buttonstates. So i can emulate a nunchuk on the arduino, and use it on a wiimote that is governed by a pc running wiiuse. -
So far so nice, but now its getting complicated. The final step is to emulate a nunchuk while the corresponding Wiimote is used for playing a wii game.
The handshake with the
0xF0:0x55, 0xFB:0x00, 0xFA routine from the wii.
This should equal
"deactivate encryption, move pointer to 0xFA where the ident-code starts" and then there should be a data request.
But there aint one. The wii(mote) does not seem to request the data, or the call gets lost somewhere.
It all works fine when using the wiiuse-library on my pc instead of connecting to the wii. But if I do the later, the callback where the data is sent to the wiimote does not get called. Not even once.
I could understand problems due to worng implementation of the protocol, but since I dotn even send one byte to the wii, that cant be the case, right?
So my last idea is "something about timing", like the interrupt never gets called.
Via serial-output I confirmed that the handshake is repeated about 30 times. The receive-callback hits everytime but there never seems to be a data request.
Any ideas?