The following code was used in Room 308. The code fully completed the Advanced Energy Vehicle’s run on the monorail track during final test. This code was used to complete a perfect run according to the scoring guidelines. This run also produced the highest score value when compared to all other teams on the inside track.
Room 308 code
reverse(4);
//Start
motorSpeed(4,30);
goToAbsolutePosition(-315);
//Stops at gate
reverse(4);
motorSpeed(4,35);
goFor(1.45);
reverse(4);
motorSpeed(4,0);
goFor(7.2);
//Starts for R2D2
motorSpeed(4,30);
goToAbsolutePosition(-733);
//Stops for R2D2
reverse(4);
motorSpeed(4,35);
goFor(1.55);
motorSpeed(4,0);
goFor(7);
//Starts for gate second time
motorSpeed(4,40);
goToAbsolutePosition(-595);
//Stops at gate second time
reverse(4);
motorSpeed(4,40);
goFor(3);
motorSpeed(4,0);
goFor(7.2);
//Starts for finish
reverse(4);
motorSpeed(4,35);
goToAbsolutePosition(-170);
//Stops at finish
reverse(4);
motorSpeed(4,40);
goFor(3);