|
Re: How do you set up a controller code
If you're trying to add a new joystick, then in Begin.VI, you'll need to add a joystick open function indicating which USB port to expect it on, then wire it over to a Joystick SetReference VI and give it a name. Make it look like the one that's already there, just name it something else.
In Teleop, you would do a Joystick GetReference using the name you set in Begin.vi (spelling counts), and wire it to a Joystick GetValue (or whatever that's called - not in front of my programming PC just now). Unbundle the Axes or Buttons outputs by name as needed. Wire the output of that into your control code where the driver joystick is currently wired in, and remove the connections from the driver joystick, and you should be good to go.
|