Hello I am apart 3743A R.U.D.D we recently have been building a desihn that uses three motors I was wandering id someone could write me an example of them group those motors in a motor group using python.
What have you tried so far ? perhaps post code you tried that didn’t work.
conceptually, you will create three motor objects then create a motor group object that takes the three motor objects as parameters.
1 Like
I assume you are using vex code v5. You will have to create the motor groups manually. I don’t use python, but this is some example code in c++
//drivetrain
//left
motor DriveLF = motor(PORT11, ratio6_1, true);
motor DriveLM = motor(PORT16, ratio6_1, true);
motor DriveLB = motor(PORT18, ratio6_1, true);
motor_group leftDrive = motor_group(DriveLF, DriveLM, DriveLB);
//right
motor DriveRF = motor(PORT13, ratio6_1, false);
motor DriveRM = motor(PORT17, ratio6_1, false);
motor DriveRB = motor(PORT19, ratio6_1, false);
motor_group rightDrive = motor_group(DriveRF, DriveRM, DriveRB);
basically what you are doing is declaring your motors, then declaring a motor group that includes those motors. It’s annoying that there isn’t an option for this in the graphical configuration tool in v5, but its important and helpful to learn how to create motor groups for more than 2 motors.