Drivetrain velocity won't change

I code using block code for my team, and no matter what I do I can’t change the drivetrain velocity. The drive we have is a 1:1 on blue motors, so I tried changing the velocity to 400rpm using the drivetrain velocity block. It didn’t change the speed at all. I even tried running 1rpm to see if it WAS changing at all, but it still went full speed. I put the block in a “when started” event block. How do I fix this?

If you provided a picture, that would’ve been better.

If you are using vexcode, the issue is probably the controller device. When you configure the controller in the devices tab, any controller input will override the velocity you set.

I think the reason for this is because the controller sets the drive velocity to the value of the joystick you use to move. This means that any velocity you set will be overridden (and if it wasn’t overridden, you would drive full speed straight forward).

If you really want to slow down your robot during driver control, you need to configure the controller inputs yourself not with the devices tab.

Here is a simple example of how you would do this. If you do take this approach, make sure you add the controller device but do NOT click the joysticks to make it move the robot.

In this case the speedMultiplier variable controls how fast you want your robot to drive. Since it is at 0.8 you will drive at 80% velocity multiplied by the position of the controller joysticks.

Hope this helps if you have any questions make sure to ask

1 Like

its literally just a “set drivetrain velocity” block under a “when started” block