How do I use Drivetrain.setDriveVelocity(50, percent); for autonomous?

how would I use
Drivetrain.setDriveVelocity(50, percent);

just like that. but on its own it won’t do anything, you need to follow up with a Drivetrain.drive( forward ); command.

1 Like

Do I need to add it in front of every Drivetrain.drive or is it fine if I put one Drivetrain.setDriveVelocity at the beginning of my code?

no. You can put it at the beginning of your code. The drive velocity will remain at whatever you set it to, unless you set it again.