Chapter 6.3 - Right and left detection

Write the following program to have the Edison robot continuously drive avoiding obstacles to the left and right.

In the above program we are using ‘IF’ icons. These are very important icons, because they give the robot the ability to make decisions without human guidance. When this occurs in a robot it is now called an autonomous robot, as it has artificial intelligence.

An ‘If’ icon asks whether a condition is true or false. If the result is true the program takes the path with a tick. If the result is false the program takes the path with the cross.

The above program has three different paths that it can take based on where an obstacle is.