Performance Test Code

Performance Test 1 Code:

reverse(1); // Reverse motor 1

motorSpeed(4,40); // Run all motors for 40% power

goToRelativePosition(198); // Continue previous command for 198 marks

reverse(4); // Reverse all motors

motorSpeed(4,40); // Run all motors for 40% power

goFor(1.25); // Run previous command for 1.25 seconds

brake(4); // Cut power to all motors

goFor(10); // Run previous command for 10 seconds

reverse(4); // Reverse all motors

motorSpeed(4,35); // Run all motors for 35% power

goFor(3); // Run previous command for 3 seconds

 

Performance Test 2 Code:

reverse(1); // Reverse motor 1

motorSpeed(4,40); // Run all motors for 40% power

goToRelativePosition(198); // Continue previous command for 198 marks

reverse(4); // Reverse all motors

motorSpeed(4,40); // Run all motors for 40% power

goFor(1.25); // Run previous command for 1.25 seconds

brake(4); // Cut power to all motors

goFor(10); // Run previous command for 10 seconds

reverse(4); // Reverse all motors

motorSpeed(4,35); // Run all motors for 35% power

goToRelativePosition(110); // Run previous command for 110 marks

brake(4); // Cut power to all motors

goFor(2.7); // Run previous command for 2.7 seconds

reverse(4); // Reverse all motors

motorSpeed(4,45); // Run all motors for 45% power

goFor(.75); // Run previous command for 0.75 seconds

brake(4); // Cut power to all motors

goFor(6); // Run previous command for 6 seconds

motorSpeed(4,45); // Run all motors for 45% power

goFor(2); // Run previous command for 2 seconds

 

Final Performance Test Energy Efficient Code:

 reverse(1); // Reverse Motor 1

motorSpeed(4,40); // Run all motors at 40% power

goToRelativePosition(197); // Continue previous command for 197 marks

reverse(4); // Reverse all motors

motorSpeed(4,40); // Run all motors at 40% power

goFor(1.25); // Run pervious command for 1.25 seconds

brake(4); // Cut power to all motors

goFor(10); // Run previous command for 10 seconds

reverse(4); // Reverse all motors

motorSpeed(4,35); // Run all motors at 35% power

goToRelativePosition(110); // Run previous command for 110 marks

brake(4); // Cut power to all motors

goFor(2.7); // Run previous command for 2.7 seconds

reverse(4); // Reverse all motors

motorSpeed(4,45); // Run all motors at 45% power

goFor(.75); // Run previous command for 0.75 seconds

brake(4); // Cut power to all motors

goFor(6); // Run previous command for 6 seconds

motorSpeed(4,45); // Run all motors at 45% power

goToRelativePosition(-219); // Run pervious command for -219 marks (Backwards 219 marks)

reverse(4); // Reverse all motors

motorSpeed(4,55); // Run all motors at 55% power

goFor(1.25); // Run previous command for 1.25 seconds

brake(4); // Cut powe to all motors

goFor(8); // Run previous command for 8 seconds

reverse(4); // Reverse all motors

motorSpeed(4,45); // Run all motors at 45% power

goToRelativePosition(-92); // Run previous command for -92 marks (Backwards 92 marks)

brake(4); // Cut power to all motors

goFor(4); // Run previous command for 4 seconds

reverse(4); // Reverse all motors

motorSpeed(4,50); // Run all motors at 50% power

goFor(0.5); // Run previous command for 0.5 seconds