colorSensor
Connection to color sensor
Description
Add-On Required: This feature requires the MATLAB Support Package for LEGO MINDSTORMS EV3 Hardware add-on.
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 in Object Functions.
Creation
Description
creates a connection to a color sensor. You can use this connection with the functions
listed in Object Functions to 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 the
InputPort
property.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 |