View Single Post
  #10   Spotlight this post!  
Unread 19-01-2008, 09:30
robotrobot2's Avatar
robotrobot2 robotrobot2 is offline
Computer Overlord
FRC #0151 (Tough Techs)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Nashua NH
Posts: 14
robotrobot2 is on a distinguished road
Re: Reducing the sentivity of the joystick in easyC Pro

When you have the x and y coordinates, just multiply them by themselves minus a constant and then take the square root. It should look like:

Code:
joystickx=joystickx*(joystickx-2);
joystickx=squareroot(joystickx);
joysticky=joysticky*(joysticky-2);
joysticky=squareroot(joysticky);
then just use the coordinates as you normally would. This will reduce the sensitivity a little but will still allow extremes.
__________________
Everything can always be blamed on software:

The claw can't pick up the trackball-
programmers must have messed up the claw function.

The driver crashes the robot into a wall-
the drive code must not be responsive enough.

The robot repeatedly displays "HELLO WORLD"-
that probably is software.