| 
    upm
    1.3.0
    
   Sensor/Actuator repository for libmraa (v1.7.0) 
   | 
 
API for the TCS37727 Color Light-To-Digital Converter. More...
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.
Public Member Functions | |
| TCS37727 (int bus, int atime_us=TCS37727_ATIME_DEFAULT, int devAddr=TCS37727_I2C_ADDRESS) | |
| int | checkID (void) | 
| int | setActive (void) | 
| int | setStandby (void) | 
| uint8_t | trimGain (int rawc) | 
| int | sampleData (void) | 
| uint32_t | getChannelRed (int bSampleData=0) | 
| uint32_t | getChannelGreen (int bSampleData=0) | 
| uint32_t | getChannelBlue (int bSampleData=0) | 
| uint32_t | getChannelClear (int bSampleData=0) | 
| uint32_t | getLux (int bSampleData=0) | 
| uint32_t | getColorTemperature (int bSampleData=0) | 
| int | getData (tcs37727_data_t *data, int bSampleData=0) | 
| TCS37727 | ( | int | bus, | 
| int | atime_us = TCS37727_ATIME_DEFAULT,  | 
        ||
| int | devAddr = TCS37727_I2C_ADDRESS  | 
        ||
| ) | 
Instantiates an TCS37727 object Settings: Gain 4x, Proximity Detection off
| bus | Number of the used bus | 
| atime_us | RGBC integration time | 
| devAddr | Address of the used I2C device | 

| int checkID | ( | void | ) | 
Check device_id of sensor

| int setActive | ( | void | ) | 
Set active mode, this enables periodic RGBC measurements
| int setStandby | ( | void | ) | 
Set standby mode, this disables periodic RGBC measurements Also turns off the sensor when proximity measurement is disabled
| int sampleData | ( | void | ) | 
Read out data of regs and call further function Also saves converted values to variables

| uint32_t getChannelRed | ( | int | bSampleData = 0 | ) | 
Get the calculated channel red color
| bSampleData | Flag to read sensor | 

| uint32_t getChannelGreen | ( | int | bSampleData = 0 | ) | 
Get the calculated channel green color
| bSampleData | Flag to read sensor | 

| uint32_t getChannelBlue | ( | int | bSampleData = 0 | ) | 
Get the calculated channel blue color
| bSampleData | Flag to read sensor | 

| uint32_t getChannelClear | ( | int | bSampleData = 0 | ) | 
Get the calculated channel clear color
| bSampleData | Flag to read sensor | 

| uint32_t getLux | ( | int | bSampleData = 0 | ) | 
Get the calculated lux value
| bSampleData | Flag to read sensor | 

| uint32_t getColorTemperature | ( | int | bSampleData = 0 | ) | 
Get the calculated color temperature
| bSampleData | Flag to read sensor | 

| int getData | ( | tcs37727_data_t * | data, | 
| int | bSampleData = 0  | 
        ||
| ) | 
Get calculated sensor values
| data | Calculated sensor values | 
| bSampleData | Flag to read sensor | 

 1.8.6