Logitech Rumblepad 2 programming
Blitz3D Forums/Blitz3D Beginners Area/Logitech Rumblepad 2 programming
| ||
Does anybody know how to program Logitech Rumblepad 2? I am OK with 12 keys and left-joystick port. However, I have no clue what to do with the right-joystick. Vibration is not my concern now. It seems B3D doesn't support that kind of gamepad. |
| ||
If its the same as a PS2 pad (with analog sticks), look at some of the other JoyU/V/Yaw/Pitch/Roll() commands. I know that some of them are used to read the right analog stick but I haven't used Blitz3D for ages and don't have a PS2 pad any more, so can't test. :/ |
| ||
here's a list of commands. Try using Joypitch and JoyYaw :) JoyPitch JoyRoll JoyType JoyU JoyUDir JoyV JoyVDir JoyX JoyXDir JoyY JoyYaw JoyYDir JoyZ JoyZDir |
| ||
Pongo has a configuration utility for dual analogues in the archives. http://www.blitzbasic.com/codearcs/codearcs.php?code=1592 |
| ||
All of what you all said above, and your suggested links, are confusing for me. I think configuration are different from gamepad to gamepad. For my USB Logitech Wireless Rumble 2, only these works: 12 buttons Directional pad Left stick as Hat (0, 45, 90, etc. degree) right stick as Z (Left to right, from -100 to 100 or like that) right stick as "pitch" (up to down, from -180 to 180 or like that) Note: in this gamepad many command won't work, like: JoyU, joyYaw etc. here is a test code, I hope someone else has a better idea for this type of gamepad which is very common. ;logitech cordless rumble pad 2 Graphics 800,600,8,2 While Not(KeyHit(1)) test_buttons() ;directional pad and left stick ;13 button select switcjes hat and left stick test_direction_pad() test_joy_hat() ;right stick test_right_stick_y();y values from -180(down) to 180(up) test_right_stick_x();x valuse from -100(left) to 100(right) FlushJoy Wend End ;/////// Functions ///////////////////////// ;buttons Function test_buttons() joy_button_pressed$="Joystick Pressed: " For t = 1 To 12 If JoyDown(t) Then Cls button$=Str(t) Text 0,10, joy_button_pressed$ Text 140,10, button$ End If Next End Function ;direction pad Function test_direction_pad() If JoyXDir(0) = 1 Then Cls Text 0,20, "X = right" Text 0,30, "X value is: " + Int(JoyX(0)*100) End If If JoyXDir(0) = -1 Then Cls Text 0,20, "X = Left" Text 0,30, "X value is: " + Int(JoyX(0)*100) End If If JoyYDir(0) = -1 Then Cls Text 0,20, "Y = Up" Text 0,30, "Y value is: " + Int(JoyY(0)*100) End If If JoyYDir(0) = 1 Then Cls Text 0,20, "Y = Down" Text 0,30, "Y value is: " + Int(JoyY(0)*100) End If End Function ;hat Function test_joy_hat() If JoyHat(0) <> -1 Then Cls Text 0,40, JoyHat();in degree East=270 End If End Function Function test_right_stick_y() If JoyRoll(0) <> 0 Then ;Cls jroll#=Int(JoyRoll(0))*(-1) Text 0,50,"Right Stick Angel: " + jroll# End If End Function Function test_right_stick_x() If JoyZ(0) <> 0 Then ;Cls x_value# = Int(JoyZ(0)*100) Text 0,60,"Joy Z Value: " + x_value# End If End Function |