Eye#

Introduction#

The VEX GO Eye Sensor can detect objects and identify their color, brightness, and hue. It also allows you to adjust detection range and lighting settings for more accurate readings.

Below is a list of all available blocks:

set eye light#

The set eye light block turns the Eye Sensor’s light on or off.

设定辨色仪灯 [on v]

Parameters

Description

state

The state of the sensor’s light:

  • on
  • off

Example

Example coming soon!

set eye range#

The set eye light block sets the detection range on the Eye Sensor. The default range is far.

设置辨色仪的视距为 [near v]

Parameters

Description

range

The sensor’s detection range:

  • near – Up to 18 millimeters.
  • far – Up to 40 millimeters.

Example

Example coming soon!

set eye power#

The set eye power block sets the brightness of the Eye Sensor’s light. If the light is off, this block will turn it on if the new brightness is not 0%.

设定辨色仪灯功率为 (50)%

Parameters

Description

brightness

The new brightness to set the sensor’s light to from 0% to 100%.

Example

Example coming soon!

eye found object?#

The eye found object? block returns a Boolean indicating whether or not the Eye Sensor detects an object within range.

  • True – The sensor has detected an object.

  • False – The sensor has not detected an object.

<辨色仪发现一个对象?>

Parameters

Description

This block has no parameters.

Example

Example coming soon!

eye detects color?#

The eye detects color? block returns a Boolean indicating whether the Eye Sensor detects a specified color.

  • True – The sensor detects the specified color.

  • False – The sensor does not detect the specified color.

<辨色仪测得 [红色 v]?>

Parameters

Description

color

The color to detect:

  • red
  • green
  • blue

Example

Example coming soon!

eye brightness#

The eye brightness block returns the brightness detected by the Eye Sensor from 0% to 100%.

(辨色仪亮度百分比)

Parameters

Description

This block has no parameters.

Example

Example coming soon!

eye hue#

The eye hue block returns the hue detected by the Eye Sensor in degrees from 0 to 359.

(辨色仪色度值)

Parameters

Description

This block has no parameters.

Example

Example coming soon!