|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Programming help
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 |
|
#2
|
|||
|
|||
|
Re: Programming help
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.
|
|
#3
|
|||||
|
|||||
|
Re: Programming help
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...
) |
|
#4
|
|||
|
|||
|
Re: Programming help
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.
|
|
#5
|
|||
|
|||
|
Re: Programming help
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:
![]() EDIT: Wow, I didn't read the first post full through. Oops. Well, now you know how to add a deadzone xD Last edited by Brandon_L : 24-02-2012 at 22:53. |
|
#6
|
||||
|
||||
|
Re: Programming help
Thank you for all of the replies. I understand how to do it now.
Team 1824 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|