Is There a Way to Make 2 Things Motors Run at Once?

I need to have the 2 motors run at once. Anyone know how to do this?
This is my code:
drivetrain.drive_for(FORWARD, 14, INCHES)
intake_motor.spin_for(FORWARD, 300, DEGREES)

When I run this code it runs them both at once.

Try this:

drivetrain.drive_for(FORWARD, 14, INCHES, false)
intake_motor.spin_for(FORWARD, 300, DEGREES)

I don’t personally use drivetrains but this is how I would do it with individual motors. Also you may want to change this to a more specific category like #programming-support:vexcode-tech-support

3 Likes

I did this and it works, however I had to turn up the degrees on the intake motor because it didn’t actually turn the full 300 degrees for some reason.

Is this using V5? If so do you have the correct colour motor cartridge configured?

1 Like

The other way of doing this would be to set up the motors in a master/slave condition (or parent/child depending on your terminology). I believe ROBOTC has something like that where all commands from motor A are sent to motor B.