View Single Post
  #11   Spotlight this post!  
Unread 04-02-2013, 20:41
James H James H is offline
Registered User
FRC #4256
 
Join Date: Feb 2013
Location: United States
Posts: 9
James H is an unknown quantity at this point
Re: Toggle Motor Using Button

Quote:
Originally Posted by Alan Anderson View Post
Read the Attack 3 joystick's throttle button as "axis 3 (throttle)". It'll give a value between +1 (full back/down) and -1 (full forward/up).

If you want to turn that into a value between 0 and 1, just subtract one and divide by negative two.

Is that enough information? I'm not sure if you're asking how to read the throttle control, or how to set the speed of a motor, or something else.
What you can do to take it a step further is something like this VI I designed for my team. The 4 can be changed to any number you want and it controls the fraction (in this case, 1/4) that putting the throttle all the way down will give while keeping the top value at 1.

http://www.chiefdelphi.com/forums/at...5&d=1360018159
Reply With Quote