How do we sync two motors for one axle using v5

When we had the old cortexes we used a Y cable to sync two motors in one port. We have v5 motors, so we do not have a Y cable. Is there a way to code so both motors will pick up the arm with one axle

What my team does for this, is by executing them in a function. Not sure if it works to the EXACT, but it has worked for us so far.

1 Like

I’m not sure what language you are using since you tagged this with vexcode yet posted in the PROS support forum… so I’ll answer for PROS.
You have two solutions:

  1. Make a function to set both motors at the same time:
//function that takes an int and sets the motors' velocity to it
void setArmMotors(int speed){
//call the function and give it a value
  1. Use an okapi motorGroup.
//we need to use okapi motor objects
okapi::Motor motor1(1);
okapi::Motor motor2(-2);// - indicates reversed
//link them together into a MotorGroup
okapi::MotorGroup armMotorGroup(motor1,motor2);
//move the motors together