What is the best way to program autonomous

Since there is a topic on what is the worst way to program autonomous, what do ya’ll think is the best way or what do you guys use

i immediately thought of the worst way thread

Well yeah, I mentioned it…

before i read the full post just the title

I think using encoder and making a P/I/D Loop is very effective and consistent. You can the encoders or gyros for turning. I prefer encoders but that’s just my opinion.

Besides pid my team was able to make autonomous look like this…

if(autonType == 1 && autonNear)
{
    if(!autonRed) turnNegative = true;

    intakeSpin(60);
    hoodSet(HOOD_TOP_FLAG, false);
    flywheelSpin(90, false);
    driveStraight(45_in);
    autonDelay(250);
    driveStraight(-39_in);
    driveTurn(90_deg);
    driveStraight(12_in);
    driveTurn(-14_deg);
    waitOnFlywheel();
    launchBall();
    hoodSet(HOOD_LOW_FLAG);

This uses custom pid and everything and team members who are not good programmers can still edit and change autonomous.
Here’s our code.

1 Like

wack and I dont have a fly wheel but cool