I wrote a program to implement a 6 motor drivetrain into 2 joysticks. The left joystick controls the left side motors and the right joystick controls the right side motors. But I run into the issue of my code not compiling even after looking at several forums. Can someone help me out with this?
// ---- START VEXCODE CONFIGURED DEVICES ----
// Robot Configuration:
// [Name] [Type] [Port(s)]
// Controller1 controller
// LeftForwardMotor motor 1
// LeftMiddleMotor motor 2
// LeftRearMotor motor 3
// RightFrontMotor motor 4
// RightMiddleMotor motor 5
// RightRearMotor motor 6
// ---- END VEXCODE CONFIGURED DEVICES ----
#include "vex.h"
using namespace vex;
int main() {
// Initializing Robot Configuration. DO NOT REMOVE!
vexcodeInit();
const int wheelTravel = 320;
const int trackWidth = 320;
const int wheelBase = 130;
motor_group leftMotors(LeftForwardMotor, LeftMiddleMotor, LeftRearMotor);
motor_group rightMotors(RightFrontMotor, RightMiddleMotor, RightRearMotor);
drivetrain myDrivetrain(leftMotors, rightMotors, wheelTravel, trackWidth, wheelBase, mm);
motor[leftMotors] = vexRT[Controller1.Axis3];
motor[rightMotors] = vexRT [Controller1.Axis2]
}
Can you elaborate a bit more on this? Where are you establishing the 6 motors and where is the ‘LeftDriveGroup’ and ‘RightDriveGroup’ variable coming from?