ArduSat API
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
SAT_Lum.h File Reference
#include <WProgram.h>
#include <OnboardCommLayer.h>

Go to the source code of this file.

Classes

class  SAT_Lum
 

Macros

#define SAT_Lum_VISIBLE   2
 Library for reading values from the Luminousity sensor. More...
 
#define SAT_Lum_INFRARED   1
 
#define SAT_Lum_FULLSPECTRUM   0
 
#define SAT_Lum_ADDR_LOW   0x29
 
#define SAT_Lum_ADDR_FLOAT   0x39
 
#define SAT_Lum_ADDR_HIGH   0x49
 
#define SAT_Lum_PACKAGE_T_FN_CL
 
#define SAT_Lum_READBIT   (0x01)
 
#define SAT_Lum_COMMAND_BIT   (0x80)
 
#define SAT_Lum_CLEAR_BIT   (0x40)
 
#define SAT_Lum_WORD_BIT   (0x20)
 
#define SAT_Lum_BLOCK_BIT   (0x10)
 
#define SAT_Lum_CONTROL_POWERON   (0x03)
 
#define SAT_Lum_CONTROL_POWEROFF   (0x00)
 
#define SAT_Lum_LUX_LUXSCALE   (14)
 
#define SAT_Lum_LUX_RATIOSCALE   (9)
 
#define SAT_Lum_LUX_CHSCALE   (10)
 
#define SAT_Lum_LUX_CHSCALE_TINT0   (0x7517)
 
#define SAT_Lum_LUX_CHSCALE_TINT1   (0x0FE7)
 
#define SAT_Lum_LUX_K1T   (0x0040)
 
#define SAT_Lum_LUX_B1T   (0x01f2)
 
#define SAT_Lum_LUX_M1T   (0x01be)
 
#define SAT_Lum_LUX_K2T   (0x0080)
 
#define SAT_Lum_LUX_B2T   (0x0214)
 
#define SAT_Lum_LUX_M2T   (0x02d1)
 
#define SAT_Lum_LUX_K3T   (0x00c0)
 
#define SAT_Lum_LUX_B3T   (0x023f)
 
#define SAT_Lum_LUX_M3T   (0x037b)
 
#define SAT_Lum_LUX_K4T   (0x0100)
 
#define SAT_Lum_LUX_B4T   (0x0270)
 
#define SAT_Lum_LUX_M4T   (0x03fe)
 
#define SAT_Lum_LUX_K5T   (0x0138)
 
#define SAT_Lum_LUX_B5T   (0x016f)
 
#define SAT_Lum_LUX_M5T   (0x01fc)
 
#define SAT_Lum_LUX_K6T   (0x019a)
 
#define SAT_Lum_LUX_B6T   (0x00d2)
 
#define SAT_Lum_LUX_M6T   (0x00fb)
 
#define SAT_Lum_LUX_K7T   (0x029a)
 
#define SAT_Lum_LUX_B7T   (0x0018)
 
#define SAT_Lum_LUX_M7T   (0x0012)
 
#define SAT_Lum_LUX_K8T   (0x029a)
 
#define SAT_Lum_LUX_B8T   (0x0000)
 
#define SAT_Lum_LUX_M8T   (0x0000)
 
#define SAT_Lum_LUX_K1C   (0x0043)
 
#define SAT_Lum_LUX_B1C   (0x0204)
 
#define SAT_Lum_LUX_M1C   (0x01ad)
 
#define SAT_Lum_LUX_K2C   (0x0085)
 
#define SAT_Lum_LUX_B2C   (0x0228)
 
#define SAT_Lum_LUX_M2C   (0x02c1)
 
#define SAT_Lum_LUX_K3C   (0x00c8)
 
#define SAT_Lum_LUX_B3C   (0x0253)
 
#define SAT_Lum_LUX_M3C   (0x0363)
 
#define SAT_Lum_LUX_K4C   (0x010a)
 
#define SAT_Lum_LUX_B4C   (0x0282)
 
#define SAT_Lum_LUX_M4C   (0x03df)
 
#define SAT_Lum_LUX_K5C   (0x014d)
 
#define SAT_Lum_LUX_B5C   (0x0177)
 
#define SAT_Lum_LUX_M5C   (0x01dd)
 
#define SAT_Lum_LUX_K6C   (0x019a)
 
#define SAT_Lum_LUX_B6C   (0x0101)
 
#define SAT_Lum_LUX_M6C   (0x0127)
 
#define SAT_Lum_LUX_K7C   (0x029a)
 
#define SAT_Lum_LUX_B7C   (0x0037)
 
#define SAT_Lum_LUX_M7C   (0x002b)
 
#define SAT_Lum_LUX_K8C   (0x029a)
 
#define SAT_Lum_LUX_B8C   (0x0000)
 
#define SAT_Lum_LUX_M8C   (0x0000)
 

Enumerations

enum  {
  SAT_Lum_REGISTER_CONTROL = 0x00, SAT_Lum_REGISTER_TIMING = 0x01, SAT_Lum_REGISTER_THRESHHOLDL_LOW = 0x02, SAT_Lum_REGISTER_THRESHHOLDL_HIGH = 0x03,
  SAT_Lum_REGISTER_THRESHHOLDH_LOW = 0x04, SAT_Lum_REGISTER_THRESHHOLDH_HIGH = 0x05, SAT_Lum_REGISTER_INTERRUPT = 0x06, SAT_Lum_REGISTER_CRC = 0x08,
  SAT_Lum_REGISTER_ID = 0x0A, SAT_Lum_REGISTER_CHAN0_LOW = 0x0C, SAT_Lum_REGISTER_CHAN0_HIGH = 0x0D, SAT_Lum_REGISTER_CHAN1_LOW = 0x0E,
  SAT_Lum_REGISTER_CHAN1_HIGH = 0x0F
}
 
enum  tsl2561IntegrationTime_t { SAT_Lum_INTEGRATIONTIME_13MS = 0x00, SAT_Lum_INTEGRATIONTIME_101MS = 0x01, SAT_Lum_INTEGRATIONTIME_402MS = 0x02 }
 
enum  tsl2561Gain_t { SAT_Lum_GAIN_0X = 0x00, SAT_Lum_GAIN_16X = 0x10 }
 

Macro Definition Documentation

#define SAT_Lum_ADDR_FLOAT   0x39
#define SAT_Lum_ADDR_HIGH   0x49
#define SAT_Lum_ADDR_LOW   0x29
#define SAT_Lum_BLOCK_BIT   (0x10)
#define SAT_Lum_CLEAR_BIT   (0x40)
#define SAT_Lum_COMMAND_BIT   (0x80)
#define SAT_Lum_CONTROL_POWEROFF   (0x00)
#define SAT_Lum_CONTROL_POWERON   (0x03)
#define SAT_Lum_FULLSPECTRUM   0
#define SAT_Lum_INFRARED   1
#define SAT_Lum_LUX_B1C   (0x0204)
#define SAT_Lum_LUX_B1T   (0x01f2)
#define SAT_Lum_LUX_B2C   (0x0228)
#define SAT_Lum_LUX_B2T   (0x0214)
#define SAT_Lum_LUX_B3C   (0x0253)
#define SAT_Lum_LUX_B3T   (0x023f)
#define SAT_Lum_LUX_B4C   (0x0282)
#define SAT_Lum_LUX_B4T   (0x0270)
#define SAT_Lum_LUX_B5C   (0x0177)
#define SAT_Lum_LUX_B5T   (0x016f)
#define SAT_Lum_LUX_B6C   (0x0101)
#define SAT_Lum_LUX_B6T   (0x00d2)
#define SAT_Lum_LUX_B7C   (0x0037)
#define SAT_Lum_LUX_B7T   (0x0018)
#define SAT_Lum_LUX_B8C   (0x0000)
#define SAT_Lum_LUX_B8T   (0x0000)
#define SAT_Lum_LUX_CHSCALE   (10)
#define SAT_Lum_LUX_CHSCALE_TINT0   (0x7517)
#define SAT_Lum_LUX_CHSCALE_TINT1   (0x0FE7)
#define SAT_Lum_LUX_K1C   (0x0043)
#define SAT_Lum_LUX_K1T   (0x0040)
#define SAT_Lum_LUX_K2C   (0x0085)
#define SAT_Lum_LUX_K2T   (0x0080)
#define SAT_Lum_LUX_K3C   (0x00c8)
#define SAT_Lum_LUX_K3T   (0x00c0)
#define SAT_Lum_LUX_K4C   (0x010a)
#define SAT_Lum_LUX_K4T   (0x0100)
#define SAT_Lum_LUX_K5C   (0x014d)
#define SAT_Lum_LUX_K5T   (0x0138)
#define SAT_Lum_LUX_K6C   (0x019a)
#define SAT_Lum_LUX_K6T   (0x019a)
#define SAT_Lum_LUX_K7C   (0x029a)
#define SAT_Lum_LUX_K7T   (0x029a)
#define SAT_Lum_LUX_K8C   (0x029a)
#define SAT_Lum_LUX_K8T   (0x029a)
#define SAT_Lum_LUX_LUXSCALE   (14)
#define SAT_Lum_LUX_M1C   (0x01ad)
#define SAT_Lum_LUX_M1T   (0x01be)
#define SAT_Lum_LUX_M2C   (0x02c1)
#define SAT_Lum_LUX_M2T   (0x02d1)
#define SAT_Lum_LUX_M3C   (0x0363)
#define SAT_Lum_LUX_M3T   (0x037b)
#define SAT_Lum_LUX_M4C   (0x03df)
#define SAT_Lum_LUX_M4T   (0x03fe)
#define SAT_Lum_LUX_M5C   (0x01dd)
#define SAT_Lum_LUX_M5T   (0x01fc)
#define SAT_Lum_LUX_M6C   (0x0127)
#define SAT_Lum_LUX_M6T   (0x00fb)
#define SAT_Lum_LUX_M7C   (0x002b)
#define SAT_Lum_LUX_M7T   (0x0012)
#define SAT_Lum_LUX_M8C   (0x0000)
#define SAT_Lum_LUX_M8T   (0x0000)
#define SAT_Lum_LUX_RATIOSCALE   (9)
#define SAT_Lum_PACKAGE_T_FN_CL
#define SAT_Lum_READBIT   (0x01)
#define SAT_Lum_VISIBLE   2

Library for reading values from the Luminousity sensor.

Software License Agreement (BSD License)

Copyright (c) 2010, microBuilder SARL 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.

Author
K. Townsend (microBuilder.eu)
Modified by Jorge Ortiz and NanoSatisfi, Inc.
Date
May 2013
#define SAT_Lum_WORD_BIT   (0x20)

Enumeration Type Documentation

anonymous enum
Enumerator
SAT_Lum_REGISTER_CONTROL 
SAT_Lum_REGISTER_TIMING 
SAT_Lum_REGISTER_THRESHHOLDL_LOW 
SAT_Lum_REGISTER_THRESHHOLDL_HIGH 
SAT_Lum_REGISTER_THRESHHOLDH_LOW 
SAT_Lum_REGISTER_THRESHHOLDH_HIGH 
SAT_Lum_REGISTER_INTERRUPT 
SAT_Lum_REGISTER_CRC 
SAT_Lum_REGISTER_ID 
SAT_Lum_REGISTER_CHAN0_LOW 
SAT_Lum_REGISTER_CHAN0_HIGH 
SAT_Lum_REGISTER_CHAN1_LOW 
SAT_Lum_REGISTER_CHAN1_HIGH 
Enumerator
SAT_Lum_GAIN_0X 
SAT_Lum_GAIN_16X 
Enumerator
SAT_Lum_INTEGRATIONTIME_13MS 
SAT_Lum_INTEGRATIONTIME_101MS 
SAT_Lum_INTEGRATIONTIME_402MS