Question: Motion Plus and Nunchuk Passthrough Mode
December 15, 2009 11:57AM
Hi,

i am trying to get the nunchuk, which is connected to the motionplus, to work.

Activation using 0x05 instead of 0x04 is done.
The problem is now the seperation of the values coming from motionplus and nunchuk.
AFAIK the format for the motionplus does not change, but it changes for the nunchuk.
Here is what i got:

Motionplus:
mpnc->x = (((msg[5] & 0xFC) << 6) | msg[2]);
mpnc->y = (((msg[4] & 0xFC) << 6) | msg[1]);
mpnc->z = (((msg[3] & 0xFC) << 6) | msg[0]);


Nunchuk:
mpnc->button_z = ((data[5]>>2)&1)^1;
mpnc->button_c = ((data[5]>>3)&1)^1;

mpnc->joy_x = data[0] - 128;
mpnc->joy_y = data[1] - 128;

mpnc->accel.x = ((data[2]<<2)|((data[5]>>3) & 2));
mpnc->accel.y = ((data[3]<<2)|((data[5]>>4) & 2));
mpnc->accel.z = (((data[4] & 0xFE)<<2)|((data[5]>>5) & 6));

Now if i am activating the nunchuk passthrough mode, i can see that some values are returned, but:

if nunchuk is not moved and motionplus is "moved", then the values of the nunchuk (accel) are also changed...
if motionplus is not moved and nuchuk is moved, then the values of the motionplus (x,y,z) are also changed.

Did anyone has the same problem or am i using the wrong values or is it the case that they cannot be seperated cleanly?



Edited 2 time(s). Last edit at 12/16/2009 11:01AM by Haichao.
Sorry, only registered users may post in this forum.

Click here to login