Week 1
reverse(1);\\reverse the motor
celerate(1,0,15,2.5);\\accelerate the motor from 0 to 15 power over 2.5 seconds
goFor(1);\\continue for 1 second
brake(1);\\brake motor 1
celerate(2,0,27,4);\\accelerate motor 2 from 0 to 27 in 4 seconds
goFor(2.7);\\continue for 2.7 seconds
celerate(2,27,15,1);\\accelerate motor 2 from 27 to 25 in 1 second
brake(2);\\brake motor 2
reverse(2);\\reverse motor 2
celerate(4,0,31,2);\\accelerate all motors from 0 to 31 in 2 seconds
motorSpeed(4,35);\\set all motors to speed 35
goFor(1);\\continue for 1 second
brake(2);\\brake motor 2
goFor(3);\\continue for 3 seconds
brake(4);\\brake all motors
goFor(1);\\continue for 1 second
reverse(1);reverse motor 1
celerate(1,0,19,2);accelerate motor 1 from 0 to 19 in 2 seconds
motorSpeed(2,35);\\set motor 2 to 35% power
goFor(2);\\continue for 2 seconds
motorSpeed(2,19);\\ set motor 2 to 19% power
goFor(2);\\continue for 2 seconds
celerate(4,19,0,3);\\accelerate all motors from 19 to 0 in 3 seconds
brake(4);\\brake all motors
Week 4
motorSpeed(4,22.5);\\set all motors to 22.5% power
goToAbsolutePosition(-280);\\ goto 280 marks
brake(4);\\brake all motors
Week 7
reverse(4);
motorSpeed(4,22.5);
goToAbsolutePosition(-280);
reverse(4);
motorSpeed(4,20);
goFor(1);
brake(4);
goFor(7);
reverse(4);
motorSpeed(4,22.5);
gotoAbosolutePosition(-560);
reverse(4);
motorSpeed(4,20);
goFor(1);
brake(4);
goFor(5);
motorSpeed(4,22.5);
gotoAbsolutePosition(-320);
reverse(4);
motorSpeed(4,20);
goFor(1);
brake(4);
goFor(7);
Sample Code from Performance Test 1
reverse(4); \\reverse all motors
motorSpeed(4,32.5); \\change all motor speeds to 32.5% power
goToAbsolutePosition(-184); \\run until the position at -184 marks is reached
celerate(4,32.5,27.5,1); \\decelerate all motors over 1 second to 27.5%power
goToAbsolutePosition(-400); \\run until the position at -400 marks is reached
reverse(4); \\reverse all motors
motorSpeed(4,40); \\change all motor speeds to 40%
goFor(1); \\run motors for 1 second
brake(4); \\stop all motors
goFor(7); \\idle for 7 seconds
reverse(4); \\reverse all motors
motorSpeed(4,32.5); \\change all motor speeds to 32.5% power
goToAbsolutePosition(-501); \\run until the position at -501 marks is reached
celerate(4,32.5,27.5,1); \\decelerate all motors over 1 second to 27.5%power
goToAbsolutePosition(-820); \\run until the position at -820 marks is reached
reverse(4); \\reverse all motors
motorSpeed(4,40); \\change all motor speeds to 40%
goFor(1); \\run motors for 1 second
brake(4); \\stop all motors
goFor(5); \\idle for 5 seconds
motorSpeed(4,32.5); \\change all motor speeds to 32.5% power
goToAbsolutePosition(-656); \\run until the position at -656 marks is reached
celerate(4,32.5,27.5,1); \\decelerate all motors over 1 second to 27.5%power
goToAbsolutePosition(-420); \\run until the position at -420 marks is reached
reverse(4); \\reverse all motors
motorSpeed(4,40); \\change all motor speeds to 40%
goFor(1); \\run motors for 1 second
brake(4); \\stop all motors
goFor(7); \\idle for 7 seconds
reverse(4); \\reverse all motors
motorSpeed(4,32.5); \\change all motor speeds to 32.5% power
goToAbsolutePosition(-339); \\run until the position at -339 marks is reached
celerate(4,32.5,27.5,1); \\decelerate all motors over 1 second to 27.5%power
goToAbsolutePosition(-20); \\run until the position at -20 marks is reached
reverse(4); \\reverse all motors
motorSpeed(4,40); \\change all motor speeds to 40%
goFor(1); \\run motors for 1 second
brake(4); \\stop all motors
goFor(7); \\idle for 7 seconds
Performance Test 2
reverse(4);\\reverse all motors
motorSpeed(4,32.5);\\set all motors to 32.5% power
goToAbsolutePosition(-184);\\goto 184 marks
celerate(4,32.5,27.5,1);\\decelerate all motors from 32.5% to 27.5% in 1 second
goToAbsolutePosition(-400);\\goto 400 marks
reverse(4);\\reverse all motors
motorSpeed(4,40);\\set all motors to 40% power
goFor(1);\\go for 1 second
brake(4);\\ brake all motors
goFor(7);\\ continue for 7 seconds
reverse(4);\\reverse all motors
motorSpeed(4,32.5);\\ set all motors to 32.5% power
goToAbsolutePosition(-501);\\goto 501 marks
celerate(4,32.5,27.5,1);\\decelerate all motorss from 32.5% to 27.5% power
goToAbsolutePosition(-820);\\goto 820 marks
reverse(4);\\reverse all motors
motorSpeed(4,40);\\set all motors
goFor(1);\\continue for 1 second
brake(4);\\brake all motors
goFor(5);\\ idle for 5 seconds
motorSpeed(4,32.5);\\ set all motors to 32.5% power
goToAbsolutePosition(-656);\\goto 656 marks
celerate(4,32.5,27.5,1);\\decelerate from 32.5% to 27.5% power in 1 second
goToAbsolutePosition(-420);\\goto 420 marks
reverse(4);\\reverse all motors
motorSpeed(4,40);\\set all motors to 40% power
goFor(1);\\continue for 1 second
brake(4);\\brake all motors
goFor(7);\\idle for 7 seconds
reverse(4);\\reverse all motors
motorSpeed(4,32.5);\\set all motors to 32.5% power
goToAbsolutePosition(-339);\\goto 339 marks
celerate(4,32.5,27.5,1);\\decelerate from 32.5 to 27.5% power in 1 second
goToAbsolutePosition(-20);\\goto position 20
reverse(4);\\reverse all motors
motorSpeed(4,40);\\ set all motors to 40% power
goFor(1);\\go for 1 second
brake(4);\\brake all motors
goFor(7);\\ idle for 7 seconds
Performance Test 3
Same as PT2 due to mechanical problems with the arduino short circuiting.
Final Code
motorSpeed(4,27.5);\\set all motors to 27.5% power
goToAbsolutePosition(-200);\\goto 200 marks
motorSpeed(4,0);\\turn off al motors
goToAbsolutePosition(-385);\\goto 385 marks
reverse(4);\\reverse all motors
motorSpeed(4,30);\\set all motors to 30% power
goFor(1);\\go for 1 second
brake(4);\\brake all motors
goFor(8);\\idle for 8 seconds
reverse(4);\\reverse all motors
motorSpeed(4,27.5);\\set all motors to 27.5% power
goToAbsolutePosition(-620);\\goto 620 marks
motorSpeed(4,0);\\turn all motors off
goToAbsolutePosition(-805);\\goto 805 marks
reverse(4);\\reverse all motors
motorSpeed(4,30);\\ set all motors to 30% speed
goFor(1);\\go for 1 second
brake(4);\\brake all motors
goFor(5);\\idle for 5 seconds
motorSpeed(4,42.5);\\set all motors to 42.5% power
goToAbsolutePosition(-600);\\ goto 600 marks
motorSpeed(4,0);\\ turn off all motors
reverse(4);\\reverse all motors
goToAbsolutePosition(-450);\\goto 450 marks
goFor(1);\\go for 1 second
brake(4);\\brake all motors
goFor(8);\\idle for 8 seconds
reverse(4);\\ reverse all motors
motorSpeed(4,42.5);\\set all motors to 42.5% power
goToAbsolutePosition(-180);\\goto 180 marks
motorSpeed(4,0);\\turn off all motors
goToAbsolutePosition(-30);\\goto 30 marks
reverse(4);\\reverse all motors
motorSpeed(4,42.5);\\set all motors to 42.5% power
goFor(1);\\go for 1 second
brake(4);\\brake all motors
goFor(7);\\ idle for 7 seconds