A lux sensor library
Diff: TSL2561.h
- Revision:
- 1:52b855c13204
- Parent:
- 0:a3cedb66846f
- Child:
- 2:c45d34e9c3f0
--- a/TSL2561.h Thu Jul 23 21:18:25 2015 +0000 +++ b/TSL2561.h Tue Aug 04 17:15:01 2015 +0000 @@ -15,7 +15,7 @@ // 3 i2c address options! //#define TSL2561_ADDR_LOW 0x29 -#define TSL2561_ADDR_FLOAT (0x39<<1) +#define TSL2561_ADDR_FLOAT (0x39) //#define TSL2561_ADDR_HIGH 0x49 // Lux calculations differ slightly for CS package @@ -32,6 +32,10 @@ #define TSL2561_CONTROL_POWERON (0x03) #define TSL2561_CONTROL_POWEROFF (0x00) +//ID +#define I_AM_TSL2561 0x50 +#define REG_NO_MASK 0x0F + //different timing and gain settings /*#define TSL2561_INTEGRATIONTIME_13MS (0x00) // 13.7ms #define TSL2561_INTEGRATIONTIME_101MS (0x01) // 101ms