View Single Post
  #3   Spotlight this post!  
Unread 18-01-2006, 20:15
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Sensitivity Wheels - help please

You might also find it useful to change the characteristics of the joystick vs. speed curve.

Basically, make it so that if you push the joystick within zero and halfway (for example), it gives you up to 1/2 of your max speed, then from halfway to full forward it gives you the rest.

Example:

Code:
#define SENSITIVITY_TOLERANCE 179 /* play with this value */
#define SENSITIVITY_DIVISOR 2 /* and this one too */
#define SENSITIVITY_EDGE (SENSITIVITY_TOLERANCE-127)/SENSITIVITY_DIVIDER+127

int reverse_p1_y = 0;

if( p1_y < 127 )
{
     p1_y = 254-p1_y;
     reverse_p1_y = 1;
}

if( p1_y < SENSITIVITY_TOLERANCE )
     p1_y = (p1_y - 127 )/SENSITIVITY_DIVISOR + 127;
else
     p1_y = SENSITIVITY_EDGE + (p1_y-SENSITIVITY_TOLERANCE)*(254-SENSITIVITY_EDGE)/(254-SENSITIVITY_TOLERANCE);

if( reverse_p1_y )
     p1_y = 254 - p1_y;
The result is that you can move your robot at max speed, but it is more controllable at lower speeds.