Current Arduino Code

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

// reflectanceSensorTest();

 

 //Begin at staring dock

 //Move to gate

 reverse(4);

 motorSpeed(4,40);

 goToRelativePosition(145);

 

 motorSpeed(4,0);

 goFor(2);

 

 reverse(4);

 motorSpeed(4,32);

 goFor(1);

 

 //stop between gate sensors

 //wait before the gate

 motorSpeed(4,0);

 goFor(7);

 

 //proceed through gate

 reverse(4);

 motorSpeed(4,40);

 goToRelativePosition(100);

 

 //wait

 motorSpeed(4,0);

 goFor(1.9);

 

 //show down and get the load

 reverse(4);

 motorSpeed(4,30);

 goFor(1.5);

 

 //wait

 motorSpeed(4,0);

 goFor(5);

 

 //go back

 //reverse(4);

 motorSpeed(4,50);

 goToRelativePosition(-143);

 

 //wait

 motorSpeed(4,0);

 goFor(2);

 

 //slow down

 reverse(4);

 motorSpeed(4,32);

 goFor(1.5);

 

 //wait at the gate

 motorSpeed(4,0);

 goFor(7);

 

 //back to the beginning

 reverse(4);

 motorSpeed(4,50);

 goToRelativePosition(-130);

 

 //slow down

 reverse(4);

 motorSpeed(4,32);

 goFor(1.5);

 

 // Brake motor.

 brake(4);

 

 

 

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

 

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