Autonomous does not work

image image this is the code I have right now for my autonomous but yet when I use a timed run nothing happens (the current autonomous is to test each movement). Also ignore that I have the unit as turns but the name as degrees I was to lazy to change all the names.

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);
1 Like

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
1 Like