0

Line Robot - Basic lessons - Exercises - Follow and catch

A combination of a few previous lessons.

Task: follow a wall and catch a ball.

Put a ball about 10-15 cm from the wall. Let the robot follow the wall with arm in catch-ready position. As soon as the ball enters space between jaws, catch and lift it. End the program. Use wall-following example:

void RobotLine::loop() {
	if (rightFront() > 100)
		go(80, 20);
	else
		go(20, 80);
}