Wiimote Project

Wiimote Projects => Wiimote Glovepie projects => Topic started by: violaboy13 on September 05, 2009, 12:57:53 AM

Title: Glovepie 0.29 and nunchuk analog stick
Post by: violaboy13 on September 05, 2009, 12:57:53 AM
Ok, I'm fairly new into using the wiimote on my pc but I'm getting it all figured out.
My problem is this: Using premade scripts or scripts that I've written in Glovepie I cannot make the nunchuk's analog stick recognize anything but left and down. If I move the analog stick up or right I'm given the same values of left and down. I tried the newer and older versions of Glovepie and only Glovepie 0.26 and 0.27 worked correctly with the analog stick. Glovepie 0.28 - 0.30 don't work correctly with the analog stick. Has anyone else had this problem or am I doing something wrong? Thanks for any help and expertise.
Title: Re: Glovepie 0.29 and nunchuk analog stick
Post by: Dje on October 01, 2009, 05:06:07 PM
Hi,

I'm experiencing exactly the same problem : sign for left and right values is the same (negative) and sign for up and down is also the same (positive).
Just for people wondering why we can't just use v0.27 : in this version, nunchuk analog values for joystick are correct, but it makes wiimote performances very very poor...

I hope someone has the solution.

Dje
Title: Re: Glovepie 0.29 and nunchuk analog stick
Post by: Fred126 on November 26, 2009, 07:09:34 PM
Same here... I tried a borrowed nunchuck and it works correct. So I'm not sure if is a hardware incompatibility problem.
Also I can only use the nunchuck with 0.29 version... all other versions don't recognize it at all.
Title: Re: Glovepie 0.29 and nunchuk analog stick
Post by: jimbo13 on December 22, 2009, 04:35:15 PM
I am also having this problem with versions 0.26 through 03.

Nothings worked, I've two different nunchcuks and get nothing but down and left.

I'm on windows 7 with a broadcomm blue tooth dongle how bout you guys, have you had any luck with the problem?

Title: Re: Glovepie 0.29 and nunchuk analog stick
Post by: jimbo13 on December 22, 2009, 10:54:32 PM
Well after working on this all day and giving up I realized the easy solution for my needs was just to use two wii remotes, it actually will work better.  (elaborate MMO- Exer gaming setups.)

(http://images.mmosite.com/news/2009/09/23/aion/aion_wii01.jpg)
Title: Re: Glovepie 0.29 and nunchuk analog stick
Post by: andwan0 on March 13, 2015, 04:46:48 AM
Yes! I found a post by others with same problem!!!!

I too bought a weird/different WiimotePlus+Nunchuk (x2) bundle from ebay. It appears some fake nunchucks are weird versions like ours. I am using latest GlovePIE 0.43 and it's still not fixed!!! I am using latest firmware DolphinBar.

I used PPJoy and GlovePIE's Wiimote script from:

www flibitijibibo com glovepie flibit_PPJoy.PIE

Two problems issues:


Here is my pieces of code to fix this:

This is the nunchuk joystick bit:

Code: [Select]
         debug = Wiimote1.Nunchuk.JoyY+' '+Key.A+' '+Key.S+' '+Key.D
          If 0.85 > Wiimote1.Nunchuk.JoyX > 0.5 And Key.W = 1
              Press(Key.E)
              Release(Key.W)
          Else If -0.85 < Wiimote1.Nunchuk.JoyX < 0.5 And Key.W = 1
              Press(Key.Q)
              Release(Key.W)
          Else If -0.4 < Wiimote1.Nunchuk.JoyX < 0.4
              Press(Key.W)
              Release(Key.Q)
              Release(Key.E)
          End If
          If Wiimote1.Nunchuk.JoyX > 0.86
              If Key.Q = 1 Or Key.W = 1
                  PPJoy1.Analog0 = -1
              Else
              PPJoy1.Analog0 = 1
              End If
          Else
              PPJoy1.Analog0 = Wiimote1.Nunchuk.JoyX * 1.25
          End If

          If 0.85 > Wiimote1.Nunchuk.JoyY > 0.5 And Key.S = 1
              Press(Key.D)
              Release(Key.S)
          Else If -0.85 < Wiimote1.Nunchuk.JoyY < 0.5 And Key.S = 1
              Press(Key.A)
              Release(Key.S)
          Else If -0.4 < Wiimote1.Nunchuk.JoyY < 0.4
              Press(Key.S)
              Release(Key.A)
              Release(Key.D)
          End If
          If Wiimote1.Nunchuk.JoyY < -0.86
              If Key.D = 1 Or Key.S = 1
                  PPJoy1.Analog1 = 1
              Else
              PPJoy1.Analog1 = -1
              End If
          Else
              PPJoy1.Analog1 = Wiimote1.Nunchuk.JoyY * 1.25
          End If
As you can see above, am using actualy keyboard keys to store "state"....

And here is the Z C button fix.

Code: [Select]
         PPJoy1.Digital9 = Wiimote1.Nunchuk.CButton and not Wiimote1.Nunchuk.ZButton
          PPJoy1.Digital10 = Wiimote1.Nunchuk.ZButton

Regarding the analogue stick, I wouldn't say it's completely fixed. It works as long as you don't make sudden movements. If you gradually move the joystick then you will be able to get corrected LEFT and DOWN directions.