TCS37727 Class
- ID: tcs37727
- Name: TCS37727 Color Light-To-Digital Converter
- Category: color
- Manufacturer: ams
- Link: http://ams.com/eng/Products/Light-Sensors
- Connection: i2c
Description in web-link above: The TCS3772 device family provides red, green, blue, and clear (RGBC) light sensing and, when coupled with an external IR LED, proximity detection. These devices detect light intensity under a variety of lighting conditions and through a variety of attenuation materials, including dark glass. The proximity detection feature allows a large dynamic range of operation for accurate short distance detection, such as in a cell phone, for detecting when the user positions the phone close to their ear. An internal state machine provides the ability to put the device into a low power state in between proximity and RGBC measurements providing very low average power consumption.
Item Index
Methods
TCS37727
-
bus
-
atime_us
-
devAddr
Instantiates an TCS37727 object Settings: Gain 4x, Proximity Detection off
Parameters:
-
bus
NumberNumber of the used bus
-
atime_us
NumberRGBC integration time
-
devAddr
NumberAddress of the used I2C device
Returns:
checkID
()
Number
Check device_id of sensor
Returns:
0 on success -1 on error
setActive
()
Number
Set active mode, this enables periodic RGBC measurements
Returns:
0 on success -1 on error
setStandby
()
Number
Set standby mode, this disables periodic RGBC measurements Also turns off the sensor when proximity measurement is disabled
Returns:
0 on success -1 on error
trimGain
-
rawc
Parameters:
-
rawc
Numberundefined
Returns:
sampleData
()
Number
Read out data of regs and call further function Also saves converted values to variables
Returns:
0 on success -1 on error
getChannelRed
-
bSampleData
Get the calculated channel red color
Parameters:
-
bSampleData
NumberFlag to read sensor
Returns:
The channel red color on success 999 on error
getChannelGreen
-
bSampleData
Get the calculated channel green color
Parameters:
-
bSampleData
NumberFlag to read sensor
Returns:
The channel green color on success 999 on error
getChannelBlue
-
bSampleData
Get the calculated channel blue color
Parameters:
-
bSampleData
NumberFlag to read sensor
Returns:
The channel blue color on success 999 on error
getChannelClear
-
bSampleData
Get the calculated channel clear color
Parameters:
-
bSampleData
NumberFlag to read sensor
Returns:
The channel clear color on success 999 on error
getLux
-
bSampleData
Get the calculated lux value
Parameters:
-
bSampleData
NumberFlag to read sensor
Returns:
The lux value on success 999 on error
getColorTemperature
-
bSampleData
Get the calculated color temperature
Parameters:
-
bSampleData
NumberFlag to read sensor
Returns:
The color temperature on success 999 on error
getData
-
data
-
bSampleData
Get calculated sensor values
Parameters:
-
data
Tcs37727_data_tCalculated sensor values
-
bSampleData
NumberFlag to read sensor
Returns:
0 on success -1 on error