Lab 02 Code

Scenario 2

//Runs all motors at 25% power for 2 seconds
motorSpeed(4,25);
goFor(2);

//Runs all motors at 20% power until 70.2 marks is traveled
motorSpeed(4,20);
goToAbsolutePosition(70.2);

//Reverses all motors
reverse(4);

//Runs all motors at 30% power for 1.5 seconds
motorSpeed(4,30);
goFor(1.5);

//Brakes all motors
brake(4);