How do you reverse a motor on VexCode
Are you using vexcode block or text?
Text
Characters rirudhelrhrifh
In regards to programming, put a negative in the motor power. But if you mean reverse it as in settings, open the motors and sensors setup, click the motor, and check this:
I have a drivetrain, I can’t do that. I’m pretty sure you can do that somewhere in the
int main
I just don’t know where
Why do you need to reverse a drivetrain? Wouldn’t reversing distance/velocity work?
Our two front motors are reversed, and can’t be fixed.
Bump because comp is next week and we need to test
Why? That shouldn’t be happening
configure each motor either using the graphical config (using the reverse toggle) or manually by adding “true” for the reverse flag in the constructor. This is all completely independent of the drivetrain which assumes motors are configured correctly.
@jpearman
I’m a bit confused by constructer
Here is a picture if that helps
@4610H-Allen
The motors are put in backwards.
bump
characters 20…
Ok, so let’s assume that your port 9 motor is the one that’s put in backwards. See the line motor rightMotorA = motor(PORT9...)
? Take the true
at the end and change it to a false
.
What’s the confusion ? can you explain some more.
The picture shows right motors are reversed (the true flag) also the leftIntake motor.
or are we misunderstanding your question, to have a motor spin backwards send negative velocity values whilst keeping direction set to “forward”