44 SUB_SENSOR(illuminance)
45 SUB_SENSOR(color_temperature)
50 void set_glass_attenuation_factor(
float ga);
52 void setup()
override;
53 void update()
override;
54 void dump_config()
override;
75 void calculate_temperature_and_lux_(uint16_t r, uint16_t g, uint16_t b, uint16_t c);
76 uint16_t integration_reg_;
This class simplifies creating components that periodically check a state.
This Class provides the methods to read/write bytes from/to an i2c device.
ErrorCode write_register(uint8_t a_register, const uint8_t *data, size_t len) const
writes an array of bytes to a specific register in the I²C device
ErrorCode read_register(uint8_t a_register, uint8_t *data, size_t len)
reads an array of bytes from a specific register in the I²C device
i2c::ErrorCode read_data_register_(uint8_t a_register, uint16_t &data)
bool integration_time_auto_
i2c::ErrorCode write_config_register_(uint8_t a_register, uint8_t data)
IntegrationTime501 integration_time
ErrorCode
Error codes returned by I2CBus and I2CDevice methods.
@ ERROR_OK
No error found during execution of method.
@ TCS34725_INTEGRATION_TIME_154MS
@ TCS34725_INTEGRATION_TIME_120MS
@ TCS34725_INTEGRATION_TIME_480MS
@ TCS34725_INTEGRATION_TIME_540MS
@ TCS34725_INTEGRATION_TIME_614MS
@ TCS34725_INTEGRATION_TIME_600MS
@ TCS34725_INTEGRATION_TIME_499MS
@ TCS34725_INTEGRATION_TIME_360MS
@ TCS34725_INTEGRATION_TIME_199MS
@ TCS34725_INTEGRATION_TIME_300MS
@ TCS34725_INTEGRATION_TIME_401MS
@ TCS34725_INTEGRATION_TIME_AUTO
@ TCS34725_INTEGRATION_TIME_101MS
@ TCS34725_INTEGRATION_TIME_240MS
@ TCS34725_INTEGRATION_TIME_180MS
@ TCS34725_INTEGRATION_TIME_420MS
@ TCS34725_INTEGRATION_TIME_50MS
@ TCS34725_INTEGRATION_TIME_2_4MS
@ TCS34725_INTEGRATION_TIME_24MS
constexpr uint16_t encode_uint16(uint8_t msb, uint8_t lsb)
Encode a 16-bit value given the most and least significant byte.