Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - andwan0

Pages: 1
Wiimote Glovepie projects / Re: Glovepie 0.29 and nunchuk analog stick
« 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:
  • The JoyX and JoyY, overflow... so we have two negatives on full up or down on JoyY. We have two positives on full left and right on JoyX.
  • The ZButton produces a Z and C signal.

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
          Else If -0.85 < Wiimote1.Nunchuk.JoyX < 0.5 And Key.W = 1
          Else If -0.4 < Wiimote1.Nunchuk.JoyX < 0.4
          End If
          If Wiimote1.Nunchuk.JoyX > 0.86
              If Key.Q = 1 Or Key.W = 1
                  PPJoy1.Analog0 = -1
              PPJoy1.Analog0 = 1
              End If
              PPJoy1.Analog0 = Wiimote1.Nunchuk.JoyX * 1.25
          End If

          If 0.85 > Wiimote1.Nunchuk.JoyY > 0.5 And Key.S = 1
          Else If -0.85 < Wiimote1.Nunchuk.JoyY < 0.5 And Key.S = 1
          Else If -0.4 < Wiimote1.Nunchuk.JoyY < 0.4
          End If
          If Wiimote1.Nunchuk.JoyY < -0.86
              If Key.D = 1 Or Key.S = 1
                  PPJoy1.Analog1 = 1
              PPJoy1.Analog1 = -1
              End If
              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.

Pages: 1