|
Re: motor reverse direction
It depends on what you're trying to do. If you're controlling a motor like motor.set(0.5), then you would change that to motor.set(-0.5). If you're using the output forom a joystick you should change something like motor.set(stick.getX()) to motor.set(-stick.getX()). Where motor is the motor you are inverting, and stick is the joystick you use to control it.
If you are using inverting a drive motor, it is a little different. You must use the setInvertedMotor method of robot drive. You would add drive.setInvertedMotor(kFrontLeft, true) for each of the drive motors you wish to change and would replace drive with the name of your robot drive object. If you only plan on running the motor in one direction, you could just wire the motor to the speed controller in a different way.
|