Code from Performance Test 3

// 1. Reverse all motors.

reverse(4);

// 2. Run all motors at a constant speed of 40% power and go to an absolute position of 220 marks.

motorSpeed(4,40);

goToAbsolutePosition(220);

// 3. Reverse all motors.

reverse(4);

// 4. Run all motors at a constant speed of 15% power for 3 seconds.

motorSpeed(4,15);

goFor(3);

// 5. Brake all motors for 10 seconds.

brake(4);

goFor(10);

// 6. Reverse all motors.

reverse(4);

// 7. Run all motors at a constant speed of 30% power and go to absolute position of 843 marks.

motorSpeed(4,30);

goToAbsolutePosition(843);

// 8. Reverse all motors.

reverse(4);

// 9. Run all motors at a constant speed of 20% power for 2 seconds.

motorSpeed(4,20);

goFor(2);

// 10. Brake all motors for 7 seconds.

brake(4);

goFor(7);

// 11. Run all motors at a constant speed of 40% power and go to an absolute position of 744 marks.

motorSpeed(4,40);

goToAbsolutePosition(744);

// 12. Reverse all motors.

reverse(4);

//13. Run all motors at a constant speed of 35% power for 2 seconds.

motorSpeed(4,35);

goFor(2);

// 14. Brake all motors for 11 seconds.

brake(4);

goFor(11);

//15. Reverse all motors.

reverse(4);

// 16. Run all motors at a constant speed of 40% power and go to an absolute position of 230 marks.

motorSpeed(4,40);

goToAbsolutePosition(230);

// 17. Reverse all motors.

reverse(4);

// 18. Run all motors at a constant speed of 25% power for 2 seconds.

motorSpeed(4,25);

goFor(2);

// 19. Brake all motors.

brake(4);