0

Line Robot - Basic lessons - Exercises - Line following with 4 transistors

We already learned how to follow a line with 2 transistors. It's time to go further.

Task: line following with 4 transistors.

You can use any 4 transistors to make a program that will be able to follow a line even if there are right-angled curves. You can use as a template the program we already made:

void RobotLine::loop() {
	if (line(5))
		go(-60, 90);
	else if (line(3))
		go(90, -60);
	else
		go(60, 60);
}