colorSensor
Connection to color sensor
Description
This object represents a connection to an EV3 Color Sensor (item number 45506). To read color and light intensity, use this object with the functions listed inObject Functions.
Creation
Description
creates a connection to a color sensor. You can use this connection with the functions listed inObject Functionsto read colors and measure light intensity.mycolorsensor
= colorSensor(myev3
)
If multiple color sensors are attached to the EV3 brick, this function chooses the sensor that is attached to the EV3 input port with the lowest number.
creates a connection to a color sensor that uses a specific EV3 input port defined by theInputPortproperty.mycolorsensor
= colorSensor(myev3
,inputport
)
Input Arguments
Output Arguments
Properties
Object Functions
readColor |
Read color of object in front of color sensor |
readLightIntensity |
Read intensity of light that reaches color sensor |