View Full Version : Joystick Dead band
punarhero
14-02-2002, 22:25
Hi everyone,
Can anyone tell me what code to write to put a dead band on the joysticks to make it less sensitive. Please tell me the code to make joystick 4 less sensitive anyway.
This is urgent
i do believe that innovation first has that at their web site. i know that my fellow programmer didn't like their version, so he made up his own, but i'm not exactly sure how it works. i suggest going to http://www.innovationfirst.com/firstrobotics and clicking on the white papers, then go to the joystick filter code. cut and paste the code, and alter the variables to what you need. that's the best help i can give you.
Mike Soukup
15-02-2002, 01:24
I'm not sure about the exact pbasic code, but here's the pseudo code:
if ((127 - DeadZone) > Joystick > (127 + DeadZone))
then Joystick = 127
You should perform that logic block before you use the joystick inputs in any calculations.
Mike
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.