MetaWear C++ API
0.20.0
C++ implementation of the MetaWear protocol
|
Functions for interacting with the LTR329 ambient light sensor. More...
#include "sensor_common.h"
Go to the source code of this file.
Enumerations | |
enum | MblMwAlsLtr329Gain { MBL_MW_ALS_LTR329_GAIN_1X = 0 , MBL_MW_ALS_LTR329_GAIN_2X , MBL_MW_ALS_LTR329_GAIN_4X , MBL_MW_ALS_LTR329_GAIN_8X , MBL_MW_ALS_LTR329_GAIN_48X , MBL_MW_ALS_LTR329_GAIN_96X } |
Controls the range and resolution of illuminance values. More... | |
enum | MblMwAlsLtr329IntegrationTime { MBL_MW_ALS_LTR329_TIME_100ms = 0 , MBL_MW_ALS_LTR329_TIME_50ms , MBL_MW_ALS_LTR329_TIME_200ms , MBL_MW_ALS_LTR329_TIME_400ms , MBL_MW_ALS_LTR329_TIME_150ms , MBL_MW_ALS_LTR329_TIME_250ms , MBL_MW_ALS_LTR329_TIME_300ms , MBL_MW_ALS_LTR329_TIME_350ms } |
Measurement time for each cycle. More... | |
enum | MblMwAlsLtr329MeasurementRate { MBL_MW_ALS_LTR329_RATE_50ms = 0 , MBL_MW_ALS_LTR329_RATE_100ms , MBL_MW_ALS_LTR329_RATE_200ms , MBL_MW_ALS_LTR329_RATE_500ms , MBL_MW_ALS_LTR329_RATE_1000ms , MBL_MW_ALS_LTR329_RATE_2000ms } |
How frequently to update the illuminance data. More... | |
Functions | |
METAWEAR_API MblMwDataSignal * | mbl_mw_als_ltr329_get_illuminance_data_signal (const MblMwMetaWearBoard *board) |
Retrieves the data signal representing LTR329 illuminance data This signal represents the luminance in lux. More... | |
METAWEAR_API void | mbl_mw_als_ltr329_set_gain (MblMwMetaWearBoard *board, MblMwAlsLtr329Gain gain) |
Sets the sensor gain There are altogether six gain settings (1X, 2X, 4X, 8X, 48X and 96X) available for user to configure See MblMwAlsLtr329Gain for allowed values. More... | |
METAWEAR_API void | mbl_mw_als_ltr329_set_integration_time (MblMwMetaWearBoard *board, MblMwAlsLtr329IntegrationTime integration_time) |
Sets the sensor integration time Measurement time for each full light measurement (ALS) cycle - 100ms (default) to 350 ms See MblMwAlsLtr329IntegrationTime for allowed values. More... | |
METAWEAR_API void | mbl_mw_als_ltr329_set_measurement_rate (MblMwMetaWearBoard *board, MblMwAlsLtr329MeasurementRate measurement_rate) |
Sets the sensor measurement rate Frequency of light measurement - 50ms (default) to 2000 ms See MblMwAlsLtr329MeasurementRate for allowed values. More... | |
METAWEAR_API void | mbl_mw_als_ltr329_write_config (const MblMwMetaWearBoard *board) |
Writes the configuration to the LTR329 sensor Applies the INTEGRATION TIME, MEASUREMENT RATE, and GAIN values set in set_*(). More... | |
METAWEAR_API void | mbl_mw_als_ltr329_start (const MblMwMetaWearBoard *board) |
Starts illuminance sampling. More... | |
METAWEAR_API void | mbl_mw_als_ltr329_stop (const MblMwMetaWearBoard *board) |
Stops illuminance sampling. More... | |
Functions for interacting with the LTR329 ambient light sensor.
This sensor is only available on MetaWear RPro boards.
enum MblMwAlsLtr329Gain |
Controls the range and resolution of illuminance values.
METAWEAR_API MblMwDataSignal* mbl_mw_als_ltr329_get_illuminance_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Retrieves the data signal representing LTR329 illuminance data This signal represents the luminance in lux.
board | Pointer to the board to retrieve the signal from |
METAWEAR_API void mbl_mw_als_ltr329_set_gain | ( | MblMwMetaWearBoard * | board, |
MblMwAlsLtr329Gain | gain | ||
) |
Sets the sensor gain There are altogether six gain settings (1X, 2X, 4X, 8X, 48X and 96X) available for user to configure See MblMwAlsLtr329Gain for allowed values.
board | Pointer to the board to modify |
gain | Sensor gain value to set |
METAWEAR_API void mbl_mw_als_ltr329_set_integration_time | ( | MblMwMetaWearBoard * | board, |
MblMwAlsLtr329IntegrationTime | integration_time | ||
) |
Sets the sensor integration time Measurement time for each full light measurement (ALS) cycle - 100ms (default) to 350 ms See MblMwAlsLtr329IntegrationTime for allowed values.
board | Pointer to the board to modify |
integration_time | Integration time value to set |
METAWEAR_API void mbl_mw_als_ltr329_set_measurement_rate | ( | MblMwMetaWearBoard * | board, |
MblMwAlsLtr329MeasurementRate | measurement_rate | ||
) |
Sets the sensor measurement rate Frequency of light measurement - 50ms (default) to 2000 ms See MblMwAlsLtr329MeasurementRate for allowed values.
board | Pointer to the board to modify |
measurement_rate | Measurement rate value to set |
METAWEAR_API void mbl_mw_als_ltr329_start | ( | const MblMwMetaWearBoard * | board | ) |
Starts illuminance sampling.
board | Pointer to the board to send the command to |
METAWEAR_API void mbl_mw_als_ltr329_stop | ( | const MblMwMetaWearBoard * | board | ) |
Stops illuminance sampling.
board | Pointer to the board to send the command to |
METAWEAR_API void mbl_mw_als_ltr329_write_config | ( | const MblMwMetaWearBoard * | board | ) |
Writes the configuration to the LTR329 sensor Applies the INTEGRATION TIME, MEASUREMENT RATE, and GAIN values set in set_*().
board | Pointer to the board to send the command to |