Lab 3 – Concept Screening and Scoring

Description of code: Short code that runs the AEV on a straight tracks


//reverse first since the motors were running in reverse to begin with

 reverse(4);

 //Accelerate all motors from 0 to 25% in 3 seconds

 celerate(4,0,25,3);

 //run all motors at above speed(25%) for 1 second

 goFor(1)

 //Run all motors at 20% for 2 second

 motorSpeed(4, 20);

 goFor(2);

 //reverse all motors

 reverse(4);

 //Run all motors at a constant speed(25%) for 2 seconds

 motorSpeed(4,20);

 goFor(2);

 //Brake all motors

 brake(4);