# E. Final Test

//Run all motors at a constant speed of 33% power.
motorSpeed(4,33);
//Using the goToAbsolutePosition function travel a total distance of 230 marks (from the starting point)
goToAbsolutePosition(230);
//Run all motors at a constant speed of 10% power.
motorSpeed(4,10);
//Using the goToAbsolutePosition function travel a total distance of 292 marks (from the starting point)
goToAbsolutePosition(292);
//Brake all motors for 7 seconds.
brake(4);
for(pos = 10; pos <= 70; pos += 10)
{
rotateServo(pos);
delay(30);
}
rotateServo(73);
goFor(8);
rotateServo(20);
//Run all motors at a constant speed of 28% power.
motorSpeed(4,28);
//Using the goToAbsolutePosition function travel a total distance of 460 marks (from the starting point)
goToAbsolutePosition(460);
//Run all motors at a constant speed of 10% power.
motorSpeed(4,10);
//Using the goToAbsolutePosition function travel a total distance of 600 marks (from the starting point)
goToAbsolutePosition(600);
//Run all motors at a constant speed of 5% power.
motorSpeed(4,5);
//Using the goToAbsolutePosition function travel a total distance of 620 marks (from the starting point)
goToAbsolutePosition(620);
//Brake all motors for 5 seconds.
brake(4);
for(pos = 10; pos <= 70; pos += 10)
{
rotateServo(pos);
delay(30);
}
rotateServo(74);
goFor(6);
rotateServo(20);
//reverse all motors.
reverse(4);
//Run all motors at a constant speed of 57% power.
motorSpeed(4,57);
//Using the goToAbsolutePosition function travel a total distance of 402 marks (from the starting point)
goToAbsolutePosition(402);
//Run all motors at a constant speed of 35% power.
motorSpeed(4,35);
//Using the goToAbsolutePosition function travel a total distance of 382 marks (from the starting point)
goToAbsolutePosition(382);
//Brake all motors for 7 seconds.
brake(4);
for(pos = 10; pos <= 70; pos += 10)
{
rotateServo(pos);
delay(17);
}
rotateServo(76);
goFor(8);
rotateServo(20);
//Run all motors at a constant speed of 58% power.
motorSpeed(4,58);
//Using the goToAbsolutePosition function travel a total distance of 279 marks (from the starting point)
goToAbsolutePosition(279);
//Run all motors at a constant speed of 48% power.
motorSpeed(4,48);
//Using the goToAbsolutePosition function travel a total distance of 246 marks (from the starting point)
goToAbsolutePosition(246);
//Run all motors at a constant speed of 37% power.
motorSpeed(4,37);
//Using the goToAbsolutePosition function travel a total distance of 145 marks (from the starting point)
goToAbsolutePosition(145);
//Run all motors at a constant speed of 35% power.
motorSpeed(4,35);
//Using the goToAbsolutePosition function travel a total distance of 121 marks (from the starting point)
goToAbsolutePosition(121);
//Run all motors at a constant speed of 15% power.
motorSpeed(4,15);
//Using the goToAbsolutePosition function travel a total distance of 91 marks (from the starting point)
goToAbsolutePosition(91);
//Brake all motors.
brake(4);
for(pos = 10; pos <= 70; pos += 10)
{
rotateServo(pos);
delay(12);
}
rotateServo(76);