Final Performance Test

Final Performance Test Preperation and Results

Preparation

Group F continued to build on the working code from performance test 2.  The code to complete the last few additional tasks was added and adjusted until the AEV was able to consistently complete the new tasks.

Testing

The returning of the cart and the AEV to the gate became an issue during preliminary testing.  The rest of the run was fairly consistent, but the team struggled with the AEV either stopping short or coasting past the sensor.  Even without changing the code, this was an issue between runs where it would stop short and then next run go too far.  Eventually, it was adjusted enough to perform consistently enough that the team was confident it would work.

Results

The AEV successfully completed the final run on the second attempt in 58.01 seconds, consuming 195.57J of energy.  This is one of the lowest amounts of energy that the group was able to achieve.

Total Cost

$163,530.00

Code Used

myservo.attach(SERVO_PIN_A); // attaches the servo on pin 9 to the servo object
int neutral = 1;
int halt = 30;

myservo.write(neutral);
//Reverse Motors to go forward ———————————————–
reverse(4);
//Set both motors to 25% power;
motorSpeed(4,25);
//Slow down
goToAbsolutePosition(185);
motorSpeed(4,10);
//Go to gate (310 marks)
goToAbsolutePosition(285); //~310
//Brake AEV
brake(4);
myservo.write(halt);
//Wait for 7 seconds
delay(3500);
myservo.write(neutral);
goFor(4);
//Move past the gate
motorSpeed(4,25);
goFor(2);
brake(4);

//BEGIN PHASE 2 ———————————————————————-
//go to load
goToAbsolutePosition(615);
myservo.write(halt);
delay(15);
myservo.write(neutral);

//wait at loading
goFor(7);

//Go again
reverse(4);
motorSpeed(4,44);

//BEGIN PHASE 3 ———————————————————————–
//Back to the gate
goToAbsolutePosition(432);
brake(4);

//coast to the gate
goToAbsolutePosition(375);
myservo.write(halt);
delay(3500);
myservo.write(neutral);
goFor(4);

//Go through gate
motorSpeed(4,60);
goToAbsolutePosition(295);
brake(4);

//Stop at end
goToAbsolutePosition(190);
reverse(4);
motorSpeed(4,30);
goFor(2);
brake(4);