diff --git a/Adafruit_TSL2561_U.cpp b/Adafruit_TSL2561_U.cpp index fca150c..69663fa 100644 --- a/Adafruit_TSL2561_U.cpp +++ b/Adafruit_TSL2561_U.cpp @@ -107,8 +107,7 @@ boolean Adafruit_TSL2561_Unified::init() { /* Make sure we're actually connected */ uint8_t x = read8(TSL2561_REGISTER_ID); - if (!(x & 0x0A)) - { + if (x & 0xF0 != 0x10) { // ID code for TSL2561 return false; } _tsl2561Initialised = true; diff --git a/examples/sensorapi/sensorapi.ino b/examples/sensorapi/sensorapi.ino index 640cbb7..665d579 100644 --- a/examples/sensorapi/sensorapi.ino +++ b/examples/sensorapi/sensorapi.ino @@ -16,9 +16,9 @@ Connections =========== - Connect SCL to analog 5 - Connect SDA to analog 4 - Connect VDD to 3.3V DC + Connect SCL to I2C SCL Clock + Connect SDA to I2C SDA Data + Connect VDD to 3.3V or 5V (whatever your logic level is) Connect GROUND to common ground I2C Address diff --git a/library.properties b/library.properties index bf99b7b..7656b9d 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Adafruit TSL2561 -version=1.0.1 +version=1.0.2 author=Adafruit maintainer=Adafruit sentence=Unified sensor driver for Adafruit's TSL2561 breakouts