View Single Post
  #2   Spotlight this post!  
Unread 13-06-2010, 21:31
JamJam263 JamJam263 is offline
Registered User
FRC #0263
 
Join Date: Feb 2009
Location: Lk Ronkonkoma
Posts: 27
JamJam263 is a glorious beacon of lightJamJam263 is a glorious beacon of lightJamJam263 is a glorious beacon of lightJamJam263 is a glorious beacon of lightJamJam263 is a glorious beacon of light
Re: range of joystick input?

Quote:
Originally Posted by isaacdl View Post
I'm setting up a throttle control for our bot, using the Z axis (throttle control). The code I'm using to get the value of the Z axis is:

Code:
throttleSpeed = rightStick.getZ() ;
(throttleSpeed is type double.) I need to know what range the value of throttleSpeed could be. Is it -1 to 1, or 0 to 1, or 1 - 255, or something completely different?
-1 to 1, where -1 is flat, 0 is half way up, 1 is completely up. We've used throttle control the past two years where
Code:
throttleSpeed = (rightStick.getZ()+1)/2 ;
__________________
Favorite 2009 quotes:

"Do we really need all of the cRIO or can we cut it in half to save weight?"