How to change the speed of a motor with controller

So I have been trying to change the max speed of the vex 1q gen 2 motors while still allowing the robot to be controlled by a controller. The common issue I keep running into is when you put in a code for changing the rpm of a motor it disables the controller. Idk if it is even possible but if anyone knows how to fix this can you tell me.

1 Like

This is a great question I do have some students that have figured this out. Can you show us what you’ve done so far?

Okay, This is the newest code I came up with yesterday. I still haven’t tested it on our robot yet tho.
Screenshot 2023-03-06 11.41.31 AM

You may find this thread about setting Motor torque and velocity at the same time educational.

Also, how do you intend on making the motors stop once you have started them?


Thank you I checked the post and it’s quite interesting. You bring up a good point about the motors needing to be able to stop. I didn’t think of that, I will come up with some sort of code. anyways thank you for the extra help I really appreciate it.

Is your question how to change the speed with the controller? If so, try a code for joystick controlling a motor.
like when started, set (motor) velocity to controller (a,b,c,d) position. A is left stick up and down, b is left stick left to right, c is left joystick left to right, and d is left joystick up and down.