Set multiple motor teleop

I’m setting the motor speed on my code using the following command:

Setmultiplemotors (100,leftmotor, rightmotor, no motor, no motor)

But this moves the motors on my base. I want to move manually using teleoperations using the joystick not automated. Can you help?

If you are using teleop, then you probably don’t want to use the setMutlipleMotors command. With Graphical you can use tankControl and it will default to right and left joysticks for the right and left motors.

For Text, you can use the SetMotorSpeed(leftMotor, getJoystickValue(ChA)); etc.

1 Like

You can use this:
#pragma config(Motor, motor1, LeftDrive, tmotorVexIQ, PIDControl, encoder)
#pragma config(Motor, motor6, RightDrive, tmotorVexIQ, PIDControl, reversed, encoder)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

task main()
while (true)
motor[LeftDrive] = vexRT(ChA) + vexRT(ChC);
motor[RightDrive] = vexRT(ChA) - vexRT(ChC);



This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.