Wii nunchuck

[quote]Given your idle values, I would say that the joystick adds/removes 128 to each one to give its position. Could you give the values for each 8 positions, please ?
I would expect values like x from -80 to +176 and y from -77 to +179.[/quote]

See attachment.

They do not change.
Please note: I do not have a button handler. Only reads analog stick input.

If I find a way to get the values visible for a camera I will post a video to make things clear, I guess it’s very confusing.

Hi,

IMHO the wireless nunchuk and 3rd party nunchuk clones will not work with the standard encryption procedure:

RawData[x] = (byte)((RawData[x] ^ 0x17) + 0x17);

The guys at WiiBrew found a new way to encrypt the extension data, that works with all kind of extension controllers. But I’ve never tested it.

Regards Peter

Yeah he should be running my modification which makes sure its the unencrypted value so no need to xor.

[url]- YouTube

Sorry for the bad quality (phone). I guess you will see what I mean. Values are changing and are not stable.

Also note the numbers becoming bigger (annotation added)

Can you post your code. So i can reproduce here. I do not have same issues with my code so i would like to validate the differences.

It looks like there is an error in decoding the values.

public class Program
    {
        static int x;
        static int y;

        public static void Main()
        {
            FEZ_Shields.KeypadLCD.Initialize();
            FEZ_Components.Wii.Nunchuk.Initialize();
            Thread.Sleep(100);
            FEZ_Components.Wii.Nunchuk.Reset();

            while (true)
            {
                x = FEZ_Components.Wii.Nunchuk.AnalogStickX;
                y = FEZ_Components.Wii.Nunchuk.AnalogStickY; 

                FEZ_Shields.KeypadLCD.SetCursor(0, 0);
                FEZ_Shields.KeypadLCD.Print("X: " + x.ToString());
                FEZ_Shields.KeypadLCD.SetCursor(1, 0);
                FEZ_Shields.KeypadLCD.Print("Y: " + y.ToString());
                Thread.Sleep(100);
            }
        }
}

Not pretty, but enough for testing :slight_smile: I hope it’s just me doing something wrong… :stuck_out_tongue:

Cool will get this going on my off brand nunchuck once i get home.

Mine is off brand too. And also wireless. (might be a reason for failure?)
Tomorrow I will be able to lend a wired nunchuck, so tomorrow will be more testing with Wii nunchucks :smiley:

I am gonna pull out your lcd and jsut do it on debug but will be pretty much same thing.

Yes you do that. I only connected it to a LCD to show the values in the video. :wink:

Got the cabled one!
I can confirm that it works now!

Strange enough I get good solid data now. Which is a little pity, since I would really need a wireless one.

Anyway, we know now that it’s not the code, nor the wii extension.

One thing which is strange are the new value ranges, they seem a little off range. (see attachment)

Doesn’t Nintendo sell an official cordless one?

As far as I know, no they do not. :frowning: