Programing hold in joystick

It is possible to program a hold in the motor controlled by he joystick?

yeah, just add an if statement to your joystick control that checks for if the joystick is being used. If that isn’t true, brake.


yes, you could do that fairly easily.
but I will ask why the joystick? seems a waste for a valuable joystick tbh, I personally would use a button. unless you meant controller by “joystick”, in which case that’s perfectly fine. you could either have your motors hold only when that particular button is pressed, or you could have a button toggle the hold on and off.


Could be trying to set their drive to hold to prevent getting pushed or something


We want to make the lift cubes in a easy way the motor velocity varies while the degrees of the slope of the cube column are closer to 90 degrees. The joystick is to control de speed of the plane while is lofting the cubes.

Can you send me an example of the logic statement?

I’m not going to flat out write the code for you but this is the idea:

if joystick values is greater than ~10 or less than ~-10 (to account for almost-zero values) then control the motors normally. Else, stop and break.