Lab 5 Code

This code was used to run the AEV in the straight track during lab to test different designs that the team came up with during lab 5.

 

// reverse motors due to backwards propellers

reverse (4);                     

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

celerate(4,0,25,3);   

// will continue at 25% for 1 second       

goFor (1);                       

// run all motors at 20%             

motorSpeed (4,20);               

// will continue at 20% for 2 seconds            

goFor (2);                       

// reverses motor direction       

reverse (4);                     

// runs all motors at 25%       

motorSpeed (4,25);               

 // will continue at 25% for 2 seconds           

goFor(2);                        

 // will brake all motors      

brake(4);