0

Line Robot - Basic lessons - Exercises - Avoid walls

This exercise will also be handy for RCJ Rescue Line.

Task: avoid walls.

Start with the program used to follow right wall, from the previous lesson. Upgrade it in the way that it doesn't hit walls in front of it. The last program is here:

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