Alora Library
Library for using Alora shield
 All Classes Namespaces Files Functions Variables Macros Pages
Classes | Macros | Enumerations
Adafruit_TSL2591.h File Reference
#include <WProgram.h>
#include <Adafruit_Sensor.h>
#include <Wire.h>

Go to the source code of this file.

Classes

class  Adafruit_TSL2591
 

Macros

#define TSL2591_VISIBLE   (2)
 
#define TSL2591_INFRARED   (1)
 
#define TSL2591_FULLSPECTRUM   (0)
 
#define TSL2591_ADDR   (0x29)
 
#define TSL2591_READBIT   (0x01)
 
#define TSL2591_COMMAND_BIT   (0xA0)
 
#define TSL2591_CLEAR_BIT   (0x40)
 
#define TSL2591_WORD_BIT   (0x20)
 
#define TSL2591_BLOCK_BIT   (0x10)
 
#define TSL2591_ENABLE_POWERON   (0x01)
 
#define TSL2591_ENABLE_POWEROFF   (0x00)
 
#define TSL2591_ENABLE_AEN   (0x02)
 
#define TSL2591_ENABLE_AIEN   (0x10)
 
#define TSL2591_CONTROL_RESET   (0x80)
 
#define TSL2591_LUX_DF   (408.0F)
 
#define TSL2591_LUX_COEFB   (1.64F)
 
#define TSL2591_LUX_COEFC   (0.59F)
 
#define TSL2591_LUX_COEFD   (0.86F)
 

Enumerations

enum  {
  TSL2591_REGISTER_ENABLE = 0x00, TSL2591_REGISTER_CONTROL = 0x01, TSL2591_REGISTER_THRESHHOLDL_LOW = 0x02, TSL2591_REGISTER_THRESHHOLDL_HIGH = 0x03,
  TSL2591_REGISTER_THRESHHOLDH_LOW = 0x04, TSL2591_REGISTER_THRESHHOLDH_HIGH = 0x05, TSL2591_REGISTER_INTERRUPT = 0x06, TSL2591_REGISTER_CRC = 0x08,
  TSL2591_REGISTER_ID = 0x0A, TSL2591_REGISTER_CHAN0_LOW = 0x14, TSL2591_REGISTER_CHAN0_HIGH = 0x15, TSL2591_REGISTER_CHAN1_LOW = 0x16,
  TSL2591_REGISTER_CHAN1_HIGH = 0x17
}
 
enum  tsl2591IntegrationTime_t {
  TSL2591_INTEGRATIONTIME_100MS = 0x00, TSL2591_INTEGRATIONTIME_200MS = 0x01, TSL2591_INTEGRATIONTIME_300MS = 0x02, TSL2591_INTEGRATIONTIME_400MS = 0x03,
  TSL2591_INTEGRATIONTIME_500MS = 0x04, TSL2591_INTEGRATIONTIME_600MS = 0x05
}
 
enum  tsl2591Gain_t { TSL2591_GAIN_LOW = 0x00, TSL2591_GAIN_MED = 0x10, TSL2591_GAIN_HIGH = 0x20, TSL2591_GAIN_MAX = 0x30 }
 

Detailed Description

Author
KT0WN (adafruit.com)

This is a library for the Adafruit TSL2591 breakout board This library works with the Adafruit TSL2591 breakout -—> https://www.adafruit.com/products/1980

Check out the links above for our tutorials and wiring diagrams These chips use I2C to communicate

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

LICENSE

Software License Agreement (BSD License)

Copyright (c) 2014 Adafruit Industries All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.