|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi, 'sup doods?
I have a problem in setting the program code for the wheels. In my program code I've already set the wheels but there is a problem. The Joystick is too Sensitive! When I pull it full froward the robot just flies!!! Can someone please give me the code for Sensitivity? ![]() |
|
#2
|
||||
|
||||
|
Re: Sensitivity Wheels - help please
if you want full forward to go half as fast as it is now, divide the joystick readying by two
since the center (off) reading is 128, you need to add 64 to the result to get off back to 128 joystick := (joystick / 2) + 64 if you want it even slower, divide by 4 and add 96 to get zero back to 128. Something to consider: if your robot is way too fast with the motors running full speed, you might need to gear down your drivetrain (or use smaller wheels). This will bring down your top end, and give your robot more pushing and climbing power. |
|
#3
|
|||||
|
|||||
|
Re: Sensitivity Wheels - help please
You might also find it useful to change the characteristics of the joystick vs. speed curve.
Basically, make it so that if you push the joystick within zero and halfway (for example), it gives you up to 1/2 of your max speed, then from halfway to full forward it gives you the rest. Example: Code:
#define SENSITIVITY_TOLERANCE 179 /* play with this value */
#define SENSITIVITY_DIVISOR 2 /* and this one too */
#define SENSITIVITY_EDGE (SENSITIVITY_TOLERANCE-127)/SENSITIVITY_DIVIDER+127
int reverse_p1_y = 0;
if( p1_y < 127 )
{
p1_y = 254-p1_y;
reverse_p1_y = 1;
}
if( p1_y < SENSITIVITY_TOLERANCE )
p1_y = (p1_y - 127 )/SENSITIVITY_DIVISOR + 127;
else
p1_y = SENSITIVITY_EDGE + (p1_y-SENSITIVITY_TOLERANCE)*(254-SENSITIVITY_EDGE)/(254-SENSITIVITY_TOLERANCE);
if( reverse_p1_y )
p1_y = 254 - p1_y;
|
|
#4
|
||||
|
||||
|
Re: Sensitivity Wheels - help please
Quote:
the default RC code gives you half speed at half-stick, right? |
|
#5
|
|||||
|
|||||
|
Re: Sensitivity Wheels - help please
Quote:
|
|
#6
|
|||
|
|||
|
Re: Sensitivity Wheels - help please
Quote:
|
|
#7
|
||||
|
||||
|
Re: Sensitivity Wheels - help please
Don't pull the joystick foward all the way, it's like a car.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Getting A Bot To Turn | Andrew Blair | Technical Discussion | 20 | 16-10-2005 23:49 |
| Who Likes Wheels? | Rob | Technical Discussion | 22 | 06-05-2004 23:49 |
| Four Wheel, all steering, non-omniwheel, ONE power/motor source drive | FizMan | Technical Discussion | 31 | 27-04-2004 12:12 |
| Lots of Wheels and F = u x N | archiver | 2001 | 17 | 23-06-2002 23:37 |
| "Motors and Drive train edition" of Fresh From the Forum | Ken Leung | CD Forum Support | 6 | 29-01-2002 12:32 |