This commit is contained in:
ladyada
2018-01-17 12:45:13 -05:00
parent 02f2582345
commit 2b16c33959
2 changed files with 4 additions and 4 deletions

View File

@ -76,7 +76,7 @@ Adafruit_TSL2561_Unified::Adafruit_TSL2561_Unified(uint8_t addr, int32_t sensorI
/**************************************************************************/
boolean Adafruit_TSL2561_Unified::begin()
{
wire = &Wire;
_i2c = &Wire;
_i2c->begin();
return init();
}
@ -91,7 +91,7 @@ boolean Adafruit_TSL2561_Unified::begin()
/**************************************************************************/
boolean Adafruit_TSL2561_Unified::begin(TwoWire *theWire)
{
wire = theWire;
_i2c = theWire;
_i2c-> begin();
return init();
}

View File

@ -44,7 +44,7 @@
#define TSL2561_BLOCK_BIT (0x10) ///< 1 = using block read/write
#define TSL2561_CONTROL_POWERON (0x03) ///< Control register setting to turn on
#define TSL2561_CONTROL_POWEROFF (0x00)) ///< Control register setting to turn off
#define TSL2561_CONTROL_POWEROFF (0x00) ///< Control register setting to turn off
#define TSL2561_LUX_LUXSCALE (14) ///< Scale by 2^14
#define TSL2561_LUX_RATIOSCALE (9) ///< Scale ratio by 2^9
@ -194,7 +194,7 @@ class Adafruit_TSL2561_Unified : public Adafruit_Sensor {
void enable (void);
void disable (void);
void write8 (uint8_t reg, uint32_t value);
void write8 (uint8_t reg, uint8_t value);
uint8_t read8 (uint8_t reg);
uint16_t read16 (uint8_t reg);
void getData (uint16_t *broadband, uint16_t *ir);