

Is there a reason you don’t want to just configure a four-motor drive train and use the built-in drive and turn commands?
No particular reason just how I taught myself to do it.
It’s a lot easier to just configure the drivetrain in the configure station, so if you don’t have a particular reason for not doing it, I would recommend that. If you are averse to typing Drivetrain.driveFor(forward, 12, inches, 100, rpm);
every time you want to drive, you can do what I did:
void fd(double inch) {
Drivetrain.driveFor(forward, inch, inches, 100, rpm);
}
void lt(double deg) {
Drivetrain.turnFor(left, deg, degrees, 100, rpm);
}
// etc.
If you want to be able to change the speed but also not have to type 100
almost every time:
void fd(double inch, double speed = 100) { // doing speed = 100 means if when you call the function you don't add a second input, speed will = 100
Drivetrain.driveFor(forward, inch, inches, speed, rpm);
}
I do the same thing basically but I dont use the drivetrain. I put all the motors in the function to go forward in a separate page then include it into the main one then I call the functions in the autonomous function.
Yeah, but it doesn’t work. Maybe if you configured it as a drivetrain
, it would work. Or maybe this is what’s not working:
My only idea is to put controller rumbles or some other such indicator in different places so you know what’s running and what’s not.
void autonomous(void) {
// here
move(1, 100); // inside move() definition
// inside all the other ones
}