First you need: GlovePIE, then a Bluetooth remote, a Joystick, then your NXT Robot (I used Tri Bot).
Install GlovePIE and the Bluetoothe Remote onto your computer.
Then, type up this little code in GlovePIE:
Key.Up = Joystick1.y < -0.9(This is for the Logitech Extreme 3D PRO Joystick BTW) (This is also assuming that your using the default keys on the Bluetooth Remote)
Key.Down = Joystick1.y > 0.9
Key.Left = Joystick1.x < -0.9
Key.Right = JoyStick1.x > 0.9
Key.T = Joystick1.Pov1Up
Key.G = Joystick1.Pov1Down
Key.W = JoyStick1.Button1
Key.S = JoyStick.Button2
Key.Y = JoyStick1.Pov1Right
Key.H = JoyStick1.Pov1Left
Then, connect your robot to the Remote, run the script on GlovePIE, then, click the Remote window. It should work very nicely.
How did you like the first Lego-X tutorial? Coming soon, a tutorial on how to control you NXT with the Wii Remote!
jojoguy10
P.S. I have uploaded the GlovePIE Source to Google Code HERE
No comments:
Post a Comment