The purpose of this program was to serve as the initial code for testing the AEV on the monorail track. When originally testing the AEV, the propellers were faced the wrong way, making the first reverse command necessary. Furthermore, this program continued to increase the team’s fluency in the Arduino programming language with different commands than those seen in lab 2.
//Program Start
reverse(4);
motorSpeed(4,0); //Initializes speed of motors at 0%
celerate(4,0,25,3); //Accelerates the motors to 25% in 3 seconds
goFor(1); //Runs motors at 25% for 1 second.
celerate(4,25,20,1);
goFor(2); //Sets speed of motors from 25% to 20% and runs for 2 sec.
reverse(4); //Reverses the motors.
motorSpeed(4,20);
goFor(2); //Runs motors at 20% for 2 sec
brake(4); //Brakes all motors