MetaWear C++ API
0.20.0
C++ implementation of the MetaWear protocol
|
Communicates with the TCS34725 color detector. More...
#include "sensor_common.h"
Go to the source code of this file.
Enumerations | |
enum | MblMwColorDetectorTcs34725Gain { MBL_MW_CD_TCS34725_GAIN_1X = 0 , MBL_MW_CD_TCS34725_GAIN_4X , MBL_MW_CD_TCS34725_GAIN_16X , MBL_MW_CD_TCS34725_GAIN_60X } |
Available analog gain scale values. | |
Functions | |
METAWEAR_API MblMwDataSignal * | mbl_mw_cd_tcs34725_get_adc_data_signal (const MblMwMetaWearBoard *board) |
Retrieves the data signal representing detected ADC values for clear, red, green, and blue This signal represents the amount of each color present (C,R,G,B) as a percentage. More... | |
METAWEAR_API void | mbl_mw_cd_tcs34725_set_integration_time (MblMwMetaWearBoard *board, float time) |
Sets the integration time - 2.4ms to 614.4ms in 2.4ms increments The RGBC integration time impacts both the resolution and the sensitivity of the RGBC reading. More... | |
METAWEAR_API void | mbl_mw_cd_tcs34725_set_gain (MblMwMetaWearBoard *board, MblMwColorDetectorTcs34725Gain gain) |
Sets the analog gain scale RGBC gain control for the RGBC photodiodes - 1x, 4x, 16x, 60x See MblMwColorDetectorTcs34725Gain for allowed values. More... | |
METAWEAR_API void | mbl_mw_cd_tcs34725_write_config (const MblMwMetaWearBoard *board) |
Writes the configuration to the sensor Applies the INTEGRATION TIME, and GAIN values set in set_*(). More... | |
METAWEAR_API void | mbl_mw_cd_tcs34725_enable_illuminator_led (MblMwMetaWearBoard *board) |
Enable the illuminator LED. More... | |
METAWEAR_API void | mbl_mw_cd_tcs34725_disable_illuminator_led (MblMwMetaWearBoard *board) |
Disable the illuminator LED. More... | |
Variables | |
const uint8_t | MBL_MW_CD_TCS34725_ADC_CLEAR_INDEX = 0 |
Indices for component values of the color adc data signal, used with mbl_mw_datasignal_get_component. | |
const uint8_t | MBL_MW_CD_TCS34725_ADC_RED_INDEX = 1 |
const uint8_t | MBL_MW_CD_TCS34725_ADC_GREEN_INDEX = 2 |
const uint8_t | MBL_MW_CD_TCS34725_ADC_BLUE_INDEX = 3 |
Communicates with the TCS34725 color detector.
METAWEAR_API void mbl_mw_cd_tcs34725_disable_illuminator_led | ( | MblMwMetaWearBoard * | board | ) |
Disable the illuminator LED.
board | Board to modify |
METAWEAR_API void mbl_mw_cd_tcs34725_enable_illuminator_led | ( | MblMwMetaWearBoard * | board | ) |
Enable the illuminator LED.
board | Board to modify |
METAWEAR_API MblMwDataSignal* mbl_mw_cd_tcs34725_get_adc_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Retrieves the data signal representing detected ADC values for clear, red, green, and blue This signal represents the amount of each color present (C,R,G,B) as a percentage.
board | Board the sensor resides on MblMwTcs34725ColorAdc is return signal data type |
METAWEAR_API void mbl_mw_cd_tcs34725_set_gain | ( | MblMwMetaWearBoard * | board, |
MblMwColorDetectorTcs34725Gain | gain | ||
) |
Sets the analog gain scale RGBC gain control for the RGBC photodiodes - 1x, 4x, 16x, 60x See MblMwColorDetectorTcs34725Gain for allowed values.
board | Board to modify |
gain | New gain scale to use |
METAWEAR_API void mbl_mw_cd_tcs34725_set_integration_time | ( | MblMwMetaWearBoard * | board, |
float | time | ||
) |
Sets the integration time - 2.4ms to 614.4ms in 2.4ms increments The RGBC integration time impacts both the resolution and the sensitivity of the RGBC reading.
Integration of all four channels occurs simultaneously and upon completion of the conversion cycle, the results are transferred to the color data registers
board | Board to modify |
time | New integration time to use, between [2.4, 614.4] milliseconds |
METAWEAR_API void mbl_mw_cd_tcs34725_write_config | ( | const MblMwMetaWearBoard * | board | ) |
Writes the configuration to the sensor Applies the INTEGRATION TIME, and GAIN values set in set_*().
board | Board the sensor resides on |