pyupm_tcs37727 module¶
-
class
pyupm_tcs37727.
TCS37727
(bus, atime_us=200000, devAddr=41)[source]¶ Bases:
object
API for the TCS37727 Color Light-To-Digital Converter.
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.
C++ includes: tcs37727.hpp
-
getChannelBlue
(bSampleData=0)[source]¶ uint32_t getChannelBlue(int bSampleData=0)
Get the calculated channel blue color
bSampleData: Flag to read sensor
The channel blue color on success 999 on error
-
getChannelClear
(bSampleData=0)[source]¶ uint32_t getChannelClear(int bSampleData=0)
Get the calculated channel clear color
bSampleData: Flag to read sensor
The channel clear color on success 999 on error
-
getChannelGreen
(bSampleData=0)[source]¶ uint32_t getChannelGreen(int bSampleData=0)
Get the calculated channel green color
bSampleData: Flag to read sensor
The channel green color on success 999 on error
-
getChannelRed
(bSampleData=0)[source]¶ uint32_t getChannelRed(int bSampleData=0)
Get the calculated channel red color
bSampleData: Flag to read sensor
The channel red color on success 999 on error
-
getColorTemperature
(bSampleData=0)[source]¶ uint32_t getColorTemperature(int bSampleData=0)
Get the calculated color temperature
bSampleData: Flag to read sensor
The color temperature on success 999 on error
-
getData
(data, bSampleData=0)[source]¶ int getData(tcs37727_data_t *data, int bSampleData=0)
Get calculated sensor values
data: Calculated sensor values
bSampleData: Flag to read sensor
0 on success -1 on error
-
getLux
(bSampleData=0)[source]¶ uint32_t getLux(int bSampleData=0)
Get the calculated lux value
bSampleData: Flag to read sensor
The lux value on success 999 on error
-
sampleData
()[source]¶ int sampleData(void)
Read out data of regs and call further function Also saves converted values to variables
0 on success -1 on error
-
setActive
()[source]¶ int setActive(void)
Set active mode, this enables periodic RGBC measurements
0 on success -1 on error
-