Is this Autonomous code correct? This is our first time doing AUton

void autonomous( void ) {
while(Sonar1.distance(distanceUnits::in) <8)
{
Arm1.spin(vex::directionType::fwd,200, vex::velocityUnits::pct);

}
while(Sonar1.distance(distanceUnits::in)>8)
{
Frontleftmotor.spin(vex::directionType::fwd,200,vex::velocityUnits::pct);
Backleftmotor.spin(vex::directionType::fwd,200, vex::velocityUnits::pct);

Backrightmotor.spin(vex::directionType::fwd,200, vex::velocityUnits::pct);
Frontrightmotor.spin(vex::directionType::fwd,200, vex::velocityUnits::pct);
}
Frontleftmotor.stop();
Frontrightmotor.stop();
Backleftmotor.stop();
Backrightmotor.stop();
}

We have no way of knowing if it is correct for game play purposes, as we don’t know what you’re trying to accomplish nor the configuration of your robot. Code-wise, it looks like it will compile and do something when


autonomous

is called, assuming the rest of the program we can’t see is set up properly.

200 percent power is an interesting choice.