View Single Post
  #7   Spotlight this post!  
Unread 10-03-2008, 08:11
Qbranch Qbranch is offline
wow college goes fast.
AKA: Alex
FRC #1024 (Kil-A-Bytes)
Team Role: Alumni
 
Join Date: Apr 2006
Rookie Year: 2006
Location: Indianapolis
Posts: 1,174
Qbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond reputeQbranch has a reputation beyond repute
Re: How to Auto Calibrate

You can write a relatively simple algorithm that keeps watching for higher highs and lower lows and calculates the midpoint (average) value and watches how much displacement there is above and below this midpoint to scale whatever your joystick input is.

However, if you don't trim the joysticks, you could have a lot of meaningless joystick travel, such as the last 15 degrees of travel all being '255'.

-q
__________________
Electrical Engineer Illini
1024 | Programmer '06, '07, '08 | Driver '08