Exercise 4 Code

This code was used to test the Data Analysis Tool using the AEV.

celerate(4, 0, 25, 3); // accelerate all motors from start to 25% in 3 seconds

// run all motors for a constant speed of 25% for 1 second
motorSpeed(4, 25);
goFor(1);

// run all motors at 20% power for 2 seconds and then reverse the motors
motorSpeed(4, 20);
goFor(2);
reverse(4);

// run all motors at 25% power for 2 seconds and then brake all motors
motorSpeed(4, 25);
goFor(2);
brake(4);