Lab 4: Design Analysis Tool

void myCode()
{
//—————————————————————————————-
// myCode();
//
// This is the tab where the programming of your vehicle operation is done.
// Tab _00_AEV_key_words contains a compiled list of functions/subroutines used for vehicle
// operation.
//
// Note:
// (1) After running your AEV do not turn the AEV off, connect the AEV to a computer, or
// push the reset button on the Arduino. There is a 13 second processing period. In
// post processing, data is stored and battery recuperation takes place.
// (2) Time, current, voltage, total marks, position traveled are recorded approximately
// every 60 milliseconds. This may vary depending on the vehicles operational tasks.
// It takes approximately 35-40 milliseconds for each recording. Thus when programming,
// code complexity may not be beneficial.
// (3) Always comment your code. Debugging will be quicker and easier to do and will
// especially aid the instructional team in helping you.
//—————————————————————————————-

// Program between here——————————————————————-

celerate(4,0,25,3);     //accel all motors to 25% power in 3 seconds
goFor(1);                    //continue at 25% power for 1 second
motorSpeed(4,20);  //set all motors to 20% power
goFor(2);                  //continue all motors at 20% power for 2 seconds
reverse(4);              //reverse all motors
motorSpeed(4,25); //set all motors to 25% power
goFor(2);                  //continue all motors at 25% power for 2 seconds
brake(4);                 //brake all motors

// And here——————————————————————————–

} // DO NOT REMOVE. end of void myCode()

 

Power v Time Graph

Figure 4.1: Gives the plot of Power vs Time found during the lab.

Power v Distance Graph

Figure 4.2: Gives the plot of Power vs Distance found during the lab.

Distance 0-.45 and time 0-3 seconds correspond to the 1st celerate command. Distance .45-.88 and time 3 to 4 correspond to the first goFor command. Time 4-6 and distance 1-1.67 correspond to the 2nd goFor command. Time 6-8 and distance 1.67-2.13 correspond to the third goFor command.