View Single Post
  #9   Spotlight this post!  
Unread 01-09-2012, 11:33
Dexterium's Avatar
Dexterium Dexterium is offline
Registered User
AKA: Adam Poindexter
FRC #1208 (Metool Brigade)
Team Role: Programmer
 
Join Date: Sep 2012
Rookie Year: 2011
Location: United States
Posts: 24
Dexterium is an unknown quantity at this point
Re: Joystick Controls

Quote:
Originally Posted by Dexterium View Post
\What you really need to do is find some math(i have no clue what) to put between the joystick output value and the servo input value that makes 0=-1, .5=0, and 1=1. Once you do this your home free.
Found the math:
x=Value from the joystick
y=Value to the servo position

x(1/2)+1/2=y

Examples:

-1(1/2)+1/2=0
-.5(1/2)+1/2=.25
0(1/2)+1/2=.5
.5(1/2)+1/2=.75
1(1/2)+1/2=1
Reply With Quote