8 – Final Design and Code

With all of the testing completed and everything decided on, our final code and design are as follows:

Design:

Code:

reverse(4);

celerate(4,0,27,3);

motorSpeed(4,27);

goToAbsolutePosition(137);

brake(4);

reverse(4);

motorSpeed(4,49);

goFor(1);

brake(4);

goFor(7.5);

reverse(4);

motorSpeed(4,25);

goToRelativePosition(50);

brake(4);

goFor(11);

reverse(4);

motorSpeed(4,52);

goToRelativePosition(-105);

brake(4);

goFor(1);

reverse(4);

motorSpeed(4,54);

goFor(1);

brake(4);

goFor(7.5);

reverse(4);

motorSpeed(4,55);

goToRelativePosition(-40);

brake(4);

goFor(3);

reverse(4);

motorSpeed(4,54);

goFor(1);

brake(4);

 

Our final performance test on the track produced the results as follows:

 

Our total cost from this final performance test was calculated as follows (only looking at Run 2 for each section):