Step 3 – Add Operator and Color Sensor

Place an Operator and Sensor block inside the While block:


Select

Drag a inside the While block.

This will tell the robot to perform a task if it cannot detect something.

Select

Drag a inside the Not block.

Change FrontEye to DownEye.

The robot will now follow the upcoming blocks While it does not see red.

Code Example:


Click to replay