View Single Post
  #4   Spotlight this post!  
Unread 04-02-2005, 23:42
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 747
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Help with Joystick Axes and Sensitivity

Quote:
Originally Posted by bglass
Thanks a lot for the tip Alan, it solved my problem. Now I just have to figure out how to make my x-axis a little less sensitive. Thanks for your help!



Try this:


Code:
p1_y = (p1_y / 3) + ((127 / 3) * 2); //scale down Y axis
p1_x = (p1_x / 3) + ((127 / 3) * 2); //scale down X axis
 
left_pwm = Limit_Mix(2000 + p1_y - p1_x + 127); //limit pwm
right_pwm = Limit_Mix(2000 + p1_y + p1_x - 127); //limit pwm

pwm11 = left_pwm;
pwm12 = right_pwm;

If you want just a little more GO GO juice...do this:


Code:
p1_y = (p1_y / 2) + ((127 / 2) * 1); //scale down Y axis
p1_x = (p1_x / 2) + ((127 / 2) * 1); //scale down X axis
 
left_pwm = Limit_Mix(2000 + p1_y - p1_x + 127); //limit pwm
right_pwm = Limit_Mix(2000 + p1_y + p1_x - 127); //limit pwm

pwm11 = left_pwm;
pwm12 = right_pwm;
Hope it helps.
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369