Single motor 2015

I cannot get a conrtoller ( not joystick ) to the motor open in begin.vi, please help or explain, i set it for controller 1 and it wont let me connect

The default project demonstrates how to open one joystick and one RobotDrive with several motors belonging to it. The references are then saved under a name such as “Joystick 0”. That is all that Begin is responsible for.

Later in the program, such as in TeleOp, the code will retrieve the reference to the joystick or motors or other sensors and will perform reads and writes.

I don’t entirely understand what error you are receiving, but will be happy to help if you post a more detailed description. You can attach a screenshot if it helps.

Greg McKaskle

i have a extra cim set up so that if i bush a bumber on my gamepad it will move, and i want to press the opposite bumper and reverse it,

Ah. So to echo it back to you, it sounds like you want two buttons on the gamepad, one forward, one backward.

In begin, you need to Open the motor and save the refnum with a name. In TeleOp, where the joystick Get has already read the buttons, drop an Index Array node, grow it and wire up the button indices. There are really three conditions for the motor. You either run the motor forward at a speed, backwards at a speed, or you leave it off with a speed of zero.

The attached image shows how the buttons 0 and 1 are choosing any of three speeds and updates the motor controller.

Greg McKaskle

From Clipboard.PNG


From Clipboard.PNG