View Single Post
  #1   Spotlight this post!  
Unread 21-02-2005, 15:16
archimedes archimedes is offline
Registered User
#1303
 
Join Date: Dec 2004
Location: Wyoming
Posts: 4
archimedes is an unknown quantity at this point
Calibration/Zeroing of Joystick

We are trying to use a different joystick then what came in the kit. Its center is not at (127, 127). We need a way to center. Right now, we have a button that is not on the joystick wired up so that we can press it and it will then be calibrated. We don't have the code to do this. Our code right now will add a constant (either pos. or neg) to the joystick values which would then in theory have the joystick centered. The problem comes in getting that constant. How can we keep a constant wth the looped structure of the FRC code? We have tried putting it in User_Initialization and also at the spot that where the inputs are mapped to the drive PWMs. Any help would be appreciated.

archimedes, Wyoming Aftershock