|
Re: Programming a Victor motor (Logitech Joysticks)
Make sure that in Begin.vi, you open a reference to both joysticks and store them by name. By default there is only one being opened. Also make sure to open the motor controller and store it with a name.
In TeleOp, retrieve the refnums using the names and run code similar to below.
The code uses the select node to choose a value depending on the state of the button, and when it is time to combine the button values, I simply added them, deciding that if both are pressed, don't spin the motor at all. I decided to spin the motors at half speed, so I use 0.5 and -0.5.
Greg McKaskle
|