Skip to content

Search the documentation

Kit
Firmware

LineSensor

Mini

Sees a dark line on a light floor. Each eye shines infrared light at the ground and measures how much bounces back: dark surfaces send back less.

The LineSensor class is reached through this attribute of robot.

Can be None until you call robot.enable_line_sensor().

All the attributes of robot are in its table. Read Attributes that can be None to see when a part is None.

Reads the eyes now: a list of 0/1, one per eye from left to right, or only eye index (0 is the leftmost).

read(index=None)

Used in examples: Mini eyes

True when the eyes read exactly pattern, a list such as [0, 1].

matches(pattern) -> bool