Used code

Code used for test based on time

reverse(4); //fixes the problem of the AEV running backwards
celerate(4,0,40,3); //acclerate to 25 power from zero in three seconds
motorSpeed(4,40); //runs all motors at 25 power
goFor(2); //runs the motor for 1 second
motorSpeed(4,25); // runs all motors at 25 power
goFor(2); // runs for 2 seconds
reverse(4); //reverses all motors
motorSpeed(4,25); //runs all motors at 25 power
goFor(4); //runs all motors for four seconds
brake(4); //brakes all motors

Code used for test based on distance

celerate(4,0,30,3); // accelerates AEV to 30% power in 3 seconds
motorSpeed(4,30); //runs motor at constant 30% power
goToRelativePosition(200); //runs this speed until it hits 200 marks relative to starting position of AEV
reverse(4); // reverses the direction of the motor
motorSpeed(4,30); //runs the motor at constant 30% power
goToRelativePosition(-150); // travels at this speed for 150 marksĀ relative to starting position of AEV
brake(4); //brakes all four motors

For the Energy efficiency lab the code we used to test the AEV was:

reverse(4); //reverses the motors in the correct direction
motorSpeed(4,30); //sets the motor speed to a constant 30% power
goFor(4); //runs at this speed for four seconds
motorSpeed(4,0); //runs the motor at zero power to record data
goFor(10); //runs for ten seconds to record data