Skip to main content

Lesson 1: Eye Sensor Blocks

<Eye Sensor near object> Block

The <Eye Sensor near object> block reports if the Eye Sensor is close enough to an object to detect a color (red, green, blue, none).

near object

The <Eye Sensor near object> block is a Boolean reporter block that reports TRUE when the Eye Sensor is close to an object that has detectable colors, and reports FALSE if the Eye Sensor is not close to an object that has detectable colors.

The Front or Down Eye Sensor can be selected from the drop-down menu on the <Eye Sensor near object> block.

near object param

<Color sensing> Block

The <Color sensing> block reports if one of the Eye Sensors detects a specific color.

detects red

Choose which Eye Sensor to use on the <Color sensing> block.

choose sensor

The <Color sensing> block is a Boolean reporter block and reports TRUE when the Eye Sensor detects the selected color. The <Color sensing> block reports FALSE when the Eye Sensor does not detect the selected color. Choose which color to detect on the <Color sensing> block.

select color

Select the Next button to continue with the rest of this Lesson.