Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Mapping buttons on a configured joystick to new motors (http://www.chiefdelphi.com/forums/showthread.php?t=100410)

jameshayek 16-01-2012 19:51

Mapping buttons on a configured joystick to new motors
 
1 Attachment(s)
Hello all and thank you in advance for your help and advice.

I am part of team 4347 and we are all rookies. We decided to go with labView but will probably tinker in C++ as well.

My question here pertains to LabView. I have sample code that I have uploaded and I am confused on how to map buttons on a currently configured joystick to conrol a new servo or motor.

The joystick axis was originally set to control a two motor device, I changed it to control mechanum wheels. (I still must modify this control systyem when my wheels come in, as you will see from my rotation value of 0) In the sample code there was no set up for using buttons and I was unable to find good documents online.

Would someone be able to help me create/map a button to a new motor? I would like to have one button turn the motor to the right, and another to turn it to the left.

My current coding problem is in the TeleOp Vi

Thank you in advance for all your help.

James

Omar 17-01-2012 09:52

Re: Mapping buttons on a configured joystick to new motors
 
Use WPI_JoystickGet.vi it has both the joystick axis and buttons output

Mark McLeod 17-01-2012 10:21

Re: Mapping buttons on a configured joystick to new motors
 
There are examples you get to fronm the LabVIEW Getting Started Window (the first screen to appear when you start LabVIEW or you can bring it up by going to View -> Getting Started Window... from any of the project windows.
From the Getting Started Window go to:
  • Support on the left-hand menu
  • Find FRC Examples...
  • FRC Robotics on the example list
  • Joystick
Here's how you breakout joystick buttons for use.



All times are GMT -5. The time now is 11:41.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi