This sensor uses the msensor device class.
|
Value |
type_id |
29 |
# Modes |
6 |
Connection |
UART |
|
Mode 0
|
Mode 1
|
Mode 2
|
Mode 3
|
Mode 4
|
Mode 51
|
mode
|
COL-REFLECT
|
COL-AMBIENT
|
COL-COLOR
|
REF-RAW
|
RGB-RAW
|
COL-CAL
|
Description
|
Reflected
|
Ambient
|
Color
|
Raw Reflected
|
Raw Color Components
|
Calibration???
|
num_values
|
1
|
1
|
1
|
2
|
3
|
4
|
value0
|
Reflected light intensity
|
Ambient light intensity
|
Detected color2
|
Reflected/Ambient light intensity???
|
Reflected red light intensity???
|
|
Min
|
0 (no reflected light detected)
|
0 (no ambient light detected)
|
0 (none)
|
0 (???)
|
0 (???)
|
|
Max
|
100 (maximum reflected light detected)
|
100 (maximum ambient light detected)
|
7 (brown)
|
1020 (???)
|
1020 (???)
|
|
value1
|
|
|
|
Reflected/Ambient light intensity???
|
Reflected green light intensity???
|
|
Min
|
|
|
|
0 (???)
|
0 (???)
|
|
Max
|
|
|
|
1020 (???)
|
1020 (???)
|
|
value2
|
|
|
|
|
Reflected blue light intensity???
|
|
Min
|
|
|
|
|
0 (???)
|
|
Min
|
|
|
|
|
1020 (???)
|
|
units
|
pct (percentage)
|
pct (percentage)
|
col (color2)
|
none
|
none
|
none
|
dp (decimal places)
|
0
|
0
|
0
|
0
|
0
|
0
|
LED State
|
Red LED on
|
Blue LED on
|
Rapidly cycles red green and blue. Appears white or "rainbow"
|
Red LED on
|
Rapidly cycles red green and blue. Appears white or "rainbow"
|
Rapidly cycles red green and blue. Appears white or "rainbow"
|
Values in the tables that look like ```this``` are the names of sysfs attributes or values returned by said attributes.
[1]: When in COL-CAL mode, the color sensor does not respond to the keep-alive sent from the EV3 brick. As a result, the sensor will time out and reset after 1-2 seconds in COL-CAL mode. When using this mode, you should set the mode, do what you need to and change back to another mode within 1 second. Of course, LMS2012 does not appear to use this mode when "calibrating" the color sensor, so it may prove to be useless anyway.
[2]: Color values:
Value |
Color |
0 |
none - sensor too close to object |
1 |
black |
2 |
blue |
3 |
green |
4 |
yellow |
5 |
red |
6 |
white |
7 |
brown |