Sens'it SDK
v2.0.0
|
Light sensor. More...
Go to the source code of this file.
Macros | |
#define | LTR329_ALS_CONTR 0x80 |
#define | LTR329_ALS_MEAS_RATE 0x85 |
#define | LTR329_PART_ID 0x86 |
#define | LTR329_MANUFAC_ID 0x87 |
#define | LTR329_ALS_DATA_CH1_0 0x88 |
#define | LTR329_ALS_DATA_CH1_1 0x89 |
#define | LTR329_ALS_DATA_CH0_0 0x8A |
#define | LTR329_ALS_DATA_CH0_1 0x8B |
#define | LTR329_ALS_STATUS 0x8C |
#define | LTR329_ERR_NONE 0x00 |
#define | LTR329_ERR_I2C 0x40 |
#define | LTR329_ERR_ID 0x41 |
#define | LTR329_ERR_GAIN 0x42 |
#define | LTR329_ERR_MEASURE_TIMEOUT 0x43 |
Enumerations | |
enum | ltr329_gain_e { LTR329_GAIN_1X = 0b000, LTR329_GAIN_2X = 0b001, LTR329_GAIN_4X = 0b010, LTR329_GAIN_8X = 0b011, LTR329_GAIN_INVALID0 = 0b100, LTR329_GAIN_INVALID1 = 0b101, LTR329_GAIN_48X = 0b110, LTR329_GAIN_96X = 0b111, LTR329_GAIN_LAST } |
Setting for light sensor gain. More... | |
Functions | |
error_t | LTR329_init (void) |
Configure sensor with measurement rate of 2s & integration time of 50ms. Sensor is in stand-by mode. More... | |
error_t | LTR329_set_standby_mode (void) |
Put sensor in stand-by mode. More... | |
error_t | LTR329_set_active_mode (ltr329_gain_e gain) |
Put sensor in active mode & configure sensor gain. More... | |
error_t | LTR329_measure (u16 *light_ch0, u16 *light_ch1) |
Get a light measurement. Values must be divided by the configured gain to convert it in lux. More... | |
Light sensor.
This file provide sample code to use Light sensor (ref: LTR329ALS).
If you want to use other functionalities of the sensor, please refer to the datasheet: http://optoelectronics.liteon.com/upload/download/DS86-2014-0006/LTR-329ALS-01_DS_V1.pdf
enum ltr329_gain_e |
Setting for light sensor gain.