Advanced R&D – Coasting vs. Power Braking

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——————————————————————-

//Code used for Coasting Trials
motorSpeed(4,25); // Initialize both motors at 25 % power
goFor(4); // Run code from the previous line for  four seconds
motorSpeed(4,0); // Set power for both motors at 0% power
goFor(10); // Run code from previous line for 10 seconds to record coasting data

// Power Braking  used for Power breaking Trials
motorSpeed(4,25); // Initialize both motors at 25% power
goFor(4); // Run code from previous line for four seconds
reverse(4); // Reverse polarities of both motors
motorSpeed(4,25); // Initialize both motors at 25 % power (Power value ranged for different trials)
goFor(2); // Run code from previous line for two seconds
motorSpeed(4,0);//Set power for both motors at 0% power
goFor(6); // Run code from previous line for six seconds to record power braking data

 

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

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