Code for Performance Test 2

Code 1

//Go to Absolute Position at 100, reach hill
motorSpeed(4,22);
goToAbsolutePosition(99);
//Reach hill, increase speed
motorSpeed(4,28);
goToAbsolutePosition(197);
//Add Boost once AEV reaches top of hill to carry to gate
motorSpeed(4,7);
goToAbsolutePosition(210);
//Add Power Brake
brake(4);
goFor(2);
reverse(4);
motorSpeed(4,15);
goFor(1.3);
reverse(4);
//Reach gate, pause for 7 seconds
brake(4);
goFor(7);
//Part 2, After Gate
//Go to top of hill
motorSpeed(4,27);
goToAbsolutePosition(350);
//Reach top of hill, begin to coast downward
brake(4);
//Straight Track
//Power Brake to End of Track
goToAbsolutePosition(550);
brake(4);
goFor(2);
reverse(4);
motorSpeed(4,15);
goFor(1.3);

//Attach to Caboose, motors in reverse
//Pause 5 seconds
brake(4)
goFor(5);
motorSpeed(4,30);
//Go to base of Incline
goToAbsolutePosition(550);
//