Line Robot - Basic lessons - Exercises - Lift ball
As many others, a lesson quite useful for RCJ Rescue Line.
Task: lift ball.
Use already existing functions: "armCatchReady()", "armCatch()", and "armPutReady()" to, respectively:
- Open jaws, arm in lowest position.
- Close jaws (catch).
- Lift caught ball halfways to the arm's top position.
First, change parameters the in the functions so that the angles are appropriate for Your robot, then call the 3 functions one after another, with 2 sec. pause in between.
Solution
void RobotLine::loop() {
armCatchReady();
delayMs(2000);
armCatch();
delayMs(2000);
armPutReady();
delayMs(2000);
end();
}