setFuel(); /*moveForward(LOW_FORWARD, 6); turnRight(90); moveForward(MID_FORWARD, 30); // Right self before ramp moveForward(-1 * LOW_FORWARD, 6); turnRight(-90); moveForward(-1 * HIGH_FORWARD, 40); // Up the ramp we go turnRight(50); moveForward(-1 * LOW_FORWARD, 60); */ turnRight(30); moveForward(LOW_FORWARD, 18); turnRight(-75); moveForward(-1 * LOW_FORWARD, 17); turnRight(42); moveForward(-1 * HIGH_FORWARD, 45); // Up the ramp turnRight(90); //straighten on wall moveForward(MID_FORWARD, 25); leftMotor.SetPercent(HIGH_FORWARD); Sleep(FULL_SECOND); leftMotor.Stop(); moveForward(-1 * LOW_FORWARD, 12); turnRight(-64); moveForward(-1 * LOW_FORWARD, 50); turnFuel(); // Turn the fuel crank moveForward(LOW_FORWARD, 18); turnRight(-101); moveForward(LOW_FORWARD, 29); turnRight(49); //And right back down moveForward(LOW_FORWARD, 30); /* moveForward(LOW_FORWARD, 6); turnRight(-90); moveForward(MID_FORWARD, 20); moveForward(-1 * LOW_FORWARD, 4); turnRight(90); moveForward(HIGH_FORWARD, 100); */
Algorithm for Performance Test 4:
- Read in the fuel crank direction and set fuel crank servo accordingly
- Turn right
- Move forward
- Turn left
- Move backwards, lining up with ramp
- Turn right
- Move backwards up the ramp at high power
- Turn right
- Move forward, squaring up on the wall
- Move backwards
- Turn left
- Move backwards to the fuel crank
- Rotate the fuel crank in the correct direction
- Move forward
- Turn left
- Move forward, lining up with ramp
- Turn right
- Move forward down the ramp