Code 1:
reverse(4); | //All motors reversed |
motorSpeed(4,40);
goFor(3.5); |
//Run all motors at 40% power for 3.5 seconds |
brake(4);
goFor(10); |
//Brake all motors and hold for 10 seconds |
motorSpeed(4,50);
goFor(2.3); |
//Run all motors at 40% power for 2.3 seconds |
brake(4);
goFor(9); |
//Brake all motors and hold for 9 seconds |
reverse(4); | //All motors reversed |
motorSpeed(4,50);
goFor(2); |
//Run all motors at 40% power for 2 seconds |
motorSpeed(4,35);
goFor(2); |
//Run all motors at 40% power for 2 seconds |
brake(4);
goFor(10); |
//Brake all motors and hold for 10 seconds |
Code 2:
reverse(4); | //All motors reversed |
motorSpeed(4,40);
goToRelativePosition(263); |
//Run all motors at 40% power for 263 marks |
brake(4);
goFor(10); |
//Brake all motors and hold for 10 seconds |
motorSpeed(4,40);
goToRelativePosition(95); |
//Run all motors at 40% power for 95 marks |
brake(4);
goFor(9); |
//Brake all motors and hold for 9 seconds |
reverse(4); | //All motors reversed |
motorSpeed(4,50);
goToRelativePosition(75); |
//Run all motors at 40% power for 75 marks |