|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
null zone
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 ? |
|
#2
|
||||
|
||||
|
Re: null zone
Quote:
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. |
|
#3
|
|||||
|
|||||
|
Re: null zone
Quote from Innovation First website:
"The Victor 884 has a deadband with respect to the PWM signal, which is approximately 117 to 137 (127 center). " So the null zone is in the Speed Controller, you can't change the 127 center. However you can make the deadband bigger in code. I recommend calibrating your speed controllers to adjust them to your joysticks. Instructions are on the website |
|
#4
|
||||
|
||||
|
Re: null zone
Yea, see the fun thing is as soon as i posted my little problem where my head wouldnt work, the problem was solved, ill post the code tomarrow for the nullzone aand when i finish the parabola for the joystick ill post that aswell it should be funny to see working heh
--thanks for the help. |
|
#5
|
||||
|
||||
|
Re: null zone
Quote:
Works every time. |
|
#6
|
||||
|
||||
|
Re: null zone
As promised I said id post it in the morning and its morning... Im not exactly sure if it works yet i cant tels the speed untill i can use it on the "real" robot which is getting some "fine" tuning. Im going to go "program" things...
COFFEE POT... oh its too early. Code:
pwm01 = p1_y;
if (p1_y >= 120 && p1_y <= 133)
{pwm01 = 127;}
else if (p1_y < 120 && p1_y > 133)
{pwm01 = 1/1635.6 * p1_y * p1_y - 0.16149181 * p1_y * p1_y + 9.10002;}
/******************/
pwm02 = p2_y;
if (p2_y >= 120 && p2_y <= 133)
{pwm02 = 127;}
else if (p2_y < 120 && p2_y > 133)
{pwm02 = 1/1635.6 * p2_y * p2_y - 0.16149181 * p2_y * p2_y + 9.10002;}
Last edited by Xufer : 14-02-2004 at 10:36. |
|
#7
|
||||
|
||||
|
Re: null zone
Ok. it works ! yea, anyway thanks again guys. Any questions about it id be glad to answer.
-Xufer |
|
#8
|
||||
|
||||
|
Re: null zone
Sorry wasnt paying attention when i posted that it was off the backup file. heres the working version.
Code:
pwm01 = p1_y;
if (p1_y >= 120 && p1_y <= 133)
{pwm01 = 127;}
else if (p1_y < 120 && p1_y > 133)
{pwm01 = (1/1635.6 * (p1_y * p1_y) - 0.16149181 * (p1_y * p1_y) + 9.10002);}
/******************/
pwm02 = p2_y;
if (p2_y >= 120 && p2_y <= 133)
{pwm02 = 127;}
else if (p2_y < 120 && p2_y > 133)
{pwm02 = (1/1635.6 * (p2_y * p2_y) - 0.16149181 * (p2_y * p2_y) + 9.10002);}
Last edited by Xufer : 15-02-2004 at 21:58. |
|
#9
|
||||
|
||||
|
Re: null zone
Quote:
Also, it may be right, but just in case, the equation is complex, make sure that it is being evaluated the way you think it is. Somebody correct me if I'm wrong. ![]() --EDIT-- Well, not all compilers work this way. I don't konow about this compiler. ![]() Last edited by Ryan M. : 15-02-2004 at 14:09. |
|
#10
|
|||
|
|||
|
Re: null zone
check out this thread. I havent actually used this tool yet, but it seems to be what you are looking for...
lookup table |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Robot/Goal scoring: Official Answer Mike Martus | Mike Martus | OCCRA | 6 | 21-10-2003 23:51 |
| Picture of robot starting zone? | Jeff Rodriguez | General Forum | 2 | 06-01-2003 22:37 |
| Zone Zeal Pool | Joe Johnson | Championship Event | 31 | 26-09-2002 22:27 |
| Zone Zeal Pool "Entry Fee" | Joe Johnson | Championship Event | 21 | 26-04-2002 02:56 |
| need help with time zone! | Ken Leung | General Forum | 6 | 25-06-2001 12:44 |