Wiimote Project » Recent Posts
Pages: [1] 2 3 ... 10
 1 
 on: March 13, 2015, 09:46:48 am 
Started by violaboy13 - Last post by andwan0
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:
         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:
         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] 2 3 ... 10
Clicky Web Analytics