Adafruit LTR-329 and LTR-303 Light Sensors Library
|
#include "Arduino.h"
#include <Adafruit_I2CDevice.h>
#include <Adafruit_I2CRegister.h>
#include <Wire.h>
Go to the source code of this file.
Classes | |
class | Adafruit_LTR329 |
Class that stores state and functions for interacting with LTR329 Light Sensor. More... | |
class | Adafruit_LTR303 |
Class that stores state and functions for interacting with LTR303 Light Sensor. More... | |
Macros | |
#define | LTR329_I2CADDR_DEFAULT 0x29 |
I2C address. | |
#define | LTR329_PART_ID 0x86 |
Part id/revision register. | |
#define | LTR329_MANU_ID 0x87 |
Manufacturer ID register. | |
#define | LTR329_ALS_CTRL 0x80 |
ALS control register. | |
#define | LTR329_STATUS 0x8C |
Status register. | |
#define | LTR329_CH1DATA 0x88 |
Data for channel 1 (read all 4 bytes!) | |
#define | LTR329_MEAS_RATE 0x85 |
Integration time and data rate. | |
#define | LTR303_REG_INTERRUPT 0x8F |
Register to enable/configure int output. | |
#define | LTR303_REG_THRESHHIGH_LSB 0x97 |
ALS 'high' threshold limit. | |
#define | LTR303_REG_THRESHLOW_LSB 0x99 |
ALS 'low' threshold limit. | |
#define | LTR303_REG_INTPERSIST 0x9E |
Register for setting the IRQ persistance. | |
Enumerations | |
enum | ltr329_gain_t { LTR3XX_GAIN_1 = 0, LTR3XX_GAIN_2 = 1, LTR3XX_GAIN_4 = 2, LTR3XX_GAIN_8 = 3, LTR3XX_GAIN_48 = 6, LTR3XX_GAIN_96 = 7 } |
Sensor gain for ALS. | |
enum | ltr329_integrationtime_t { LTR3XX_INTEGTIME_100, LTR3XX_INTEGTIME_50, LTR3XX_INTEGTIME_200, LTR3XX_INTEGTIME_400, LTR3XX_INTEGTIME_150, LTR3XX_INTEGTIME_250, LTR3XX_INTEGTIME_300, LTR3XX_INTEGTIME_350 } |
Integration times, in milliseconds. | |
enum | ltr329_measurerate_t { LTR3XX_MEASRATE_50, LTR3XX_MEASRATE_100, LTR3XX_MEASRATE_200, LTR3XX_MEASRATE_500, LTR3XX_MEASRATE_1000, LTR3XX_MEASRATE_2000 } |
Measurement rates, in milliseconds. | |
I2C Driver for the LTR329 and LTR303 I2C Light Sensors
This is a library for the Adafruit LTR329 & LTR303 breakouts: https://www.adafruit.com/product/5591 https://www.adafruit.com/product/5610
Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!
BSD license (see license.txt)