Code Used for Advanced R&D:
// Accelerate all motors from start to 25% in 3 seconds.
celerate(4,0,25,3);
// Run all motors at 25% for 1 second
motorSpeed(4,25);goFor(1);
// Run all motors at 20% for 2 seconds
motorSpeed(4,20);goFor(2);
// Reverse all motors
reverse(4);
// Run all motors at 25% for 2 seconds
motorSpeed(4,25);goFor(2);
// Brake all motors
brake(4);
// Save the program as CSS1
Code Used For Performance Test 1:
reverse(4);motorSpeed(4,40);goFor(4.9);
reverse(4);motorSpeed(4,0);goFor(1);
motorSpeed(4,25);goFor(1.1);
motorSpeed(4,0);goFor(8);
reverse(4);motorSpeed(4,40);goFor(2);
Code Used for Performance Test 2:
reverse(4);motorSpeed(4,39);goFor(3);
reverse(4);motorSpeed(4,0);goFor(1);
motorSpeed(4,25);goFor(1.1);
motorSpeed(4,0);goFor(8);
reverse(4);motorSpeed(4,39);goFor(2.3);
motorSpeed(4,0);goFor(13);
reverse(4);motorSpeed(4,65);goFor(2);
Code Used for Final Performance Test
// Going to gate
reverse(4);motorSpeed(4,39);goFor(3.4);
reverse(4);motorSpeed(4,31.5);goFor(2);
// Stopping at gate
motorSpeed(4,0);goFor(8);
// Going through gate
reverse(4);motorSpeed(4,40);goFor(2.55);
// Stopping at loading zone
motorSpeed(4,0);goFor(8.5);
// Going back to gate
reverse(4);motorSpeed(4,65);goFor(4.9);
reverse(4);motorSpeed(4,30);goFor(2.5);
// Stopping at gate
reverse(4);motorSpeed(4,0);goFor(8);
// Going through gate and end
motorSpeed(4,60);goFor(3);
motorSpeed(4,0);goFor(2.5);
reverse(4);motorSpeed(4,25);goFor(.7);