Lab 3 Code

The code below was created to test the AEV without a specified distance:

celerate(4,0,25,4); // Brings all motors to 25% power in 4 seconds

motorSpeed(4,25); //All motors go to 25% power

goFor(1); //All motors will remain at 25% power for 1 second

motorSpeed(4,20); //All motors go to 20% power

goFor(2); //All motors will remain at 20% power for 2 seconds

reverse(4); //All motors will run in the opposite direction

motorSpeed(4,25); //All motors power at 25%

goFor(3); //All motors will remain at 25% power for 3 seconds

brake(4); //Brake all motors