Log in

View Full Version : Programming help


Team 1824
24-02-2012, 20:11
Is it possible to make the joystick less sensitive? I want to make it so that when you push the joystick all the way forward the motor goes at half speed or even quarter speed.

If anyone can help that would be great.

Thanks,
Team 1824

da johnny boy
24-02-2012, 20:23
This is fairly easy. If you want to slow down the motor speed, just divide the joystick output by how ever much you want to slow down the motor, and feed that value to motor output.

DonRotolo
24-02-2012, 20:43
I'm not a programmer, but you might want to consider doing that, but making it controllable from a joystick button - press the button once to get "low power", press it again to get "high(er) power". Particularly if we're discussing drivetrain motors - you never know when you might want (or need) more power, and giving your drivers the flexibility to get it is not such a bad idea. (Well, OK, I don't know your drivers. Maybe it IS a bad idea...:rolleyes: )

da johnny boy
24-02-2012, 20:54
Here is another program that reduces the output of the joystick whenever the 2 button on the joystick is pressed. You could also program the button to toggle the motor speed instead of having to hold the button.

Brandon_L
24-02-2012, 22:18
There is a difference between a less sensitive joystick and supplying less power to the motors. To make it less sensitive (I'm guessing maybe the problem could be its sending values to the motors when your not touching it or something) you could try something like this:

http://i42.tinypic.com/dm9wld.png

EDIT: Wow, I didn't read the first post full through. Oops. Well, now you know how to add a deadzone xD

Team 1824
25-02-2012, 09:41
Thank you for all of the replies. I understand how to do it now.

Team 1824