View Single Post
  #2   Spotlight this post!  
Unread 21-02-2005, 15:22
JoshJ JoshJ is offline
Registered User
#0316 (LuNaTeCs)
Team Role: College Student
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Salem County
Posts: 44
JoshJ is on a distinguished road
Send a message via AIM to JoshJ
Re: Calibration/Zeroing of Joystick

If you button is NOT coded, that isnt too bad. Just dont touch the joystick and let it center itself and push the button. Code would be something like:

if (switchname)
{
consty=p1_y-127;
constx=p1_x-127;
}

and then modify the drive code so it takes
pwmxx= LimitMix((p1_y-consty)+(p1_x-constx)-127);

Good Luck