Comments: The team has made it past the first gate and has added code to retrieve the R2D2 unit
Code*:
// Accelerate all motors from start to 30% power in 2 seconds.
celerate(4,0,30,2);
// Travel 14 feet to the front of the gate and brake all motors for 7 seconds.
goToAboslutePosition(296);
brake(4);
goFor(7);
// Accelerate all motors from start to 30% power in 2 seconds.
celerate(4,0,30,2);
// Travel to the loading station and brake all motors for 5 seconds.
goToAbsolutePosition(738);
brake(4);
goFor(5);
// Reverse all motors and accelerate motors from start to 20% power in 2 seconds.
reverse(4);
celerate(4,0,20,2);
// Travel 14 feet back to gate and brake all motors for 7 seconds.
goToAboslutePosition(442);
brake(4);
goFor(5);
// Accelerate all motors from start to 20% power in 2 seconds.
celerate(4,0,20,2);
// Travel to the drop-off area and brake all motors.
goToAbsolutePosition(0);
brake(4);
*code will need to be reformatted after testing to account for AEV coasting after brake