Color Sensor
I2C
input
Medium RAM
2.2.0
#Description
This sensor can detect the color of what is in front of it.
The Grove component has a little switch that needs to be toggled manually to control the LED.
For options change to take effect, please unplug and replug your board.
#Links
#Aliases
- TCS3472
#Functions
#JavaScript / Node.js
Class
ColorSensorextends I2cComponentBaseColorSensor component for reading RGB color values from TCS34725/TCS3472 sensor. This is an I2C component that emits change events when the detected color changes.
#Value type
TypeScript
interface ColorSensorValue {
r: number;
g: number;
b: number;
}#Constructor options
| Option | Type | Required | Description | Inherited from |
|---|---|---|---|---|
gain | number | optional | — | |
integrationTime | number | optional | — | |
sampleInterval | number | optional |