Thread: null zone
View Single Post
  #2   Spotlight this post!  
Unread 13-02-2004, 20:58
Richomundo's Avatar
Richomundo Richomundo is offline
Mascot
AKA: Richie Knight
#1115 (Deus Ex Machina)
Team Role: Programmer
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Santa Monica, California
Posts: 19
Richomundo is on a distinguished road
Send a message via AIM to Richomundo Send a message via Yahoo to Richomundo
Re: null zone

Quote:
Originally Posted by Xufer
where in the code is 127 defined as the null zone?

im trying to set a null zone for the joystick so i can apply a "parabola" to decrese the sensitivity for fine driving. but first off i need to set this null zone so its not a true parabola, because more than 2 points would be touching the x-axis in one spot.

nonetheless, Where is the 127 nullzone defined ?

its in the reference guide, however today i adjusted the sensitivity by making a very simple program code:

here is what i used.
the only problem is its a single speed code for the window motor.

you can change the values to make it more or less sensitive.
****************************
/* you can also change sensitivity here*/
/* if statements to raise and lower the arm */
if (p2_y > 180)
{relay1_fwd=1;
relay1_rev=0;}
else if (p2_y < 74)
{relay1_fwd=0;
relay1_rev=1;}
else
{relay1_fwd=0;
relay1_rev=0;}
/* ********************** */
the 1st if statement says if the joystick is above 180, then send a signal to relay 1 to make the window motor go. since iats a relay it only goes one speed.
sorry if i didnt answer your question
but thats how we did it.
__________________
I got the mic and you got the moshpit