TSL2591 for Electric Imp

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
forrest_m
 
Posts: 25
Joined: Thu Jul 02, 2015 7:35 pm

TSL2591 for Electric Imp

Post by forrest_m »

I want to use my TSL2591s with an Electric Imp. Luckily Electric Imp has a guide showing how to use the TSL2561 here: https://electricimp.com/docs/resources/i2c/

Unluckily, it seems that the hardware or libraries are sufficiently different to not want to simply run their example code as is. I did change the
const TSL2561_ADDR_FLOAT = 0x39; // ADDR pin floating
to Ox29 because I know the 91 has a fixed i2c address at 0x29.

It seems like the problem is that the 61 has
const TSL2561_REGISTER_TIMING = "\x81"; // Access timing register
const TSL2561_REGISTER_ADC0_LSB = "\xAC"; // LSB of sensor's two-byte ADC value
const TSL2561_REGISTER_ADC1_LSB = "\xAE"; // MSB of sensor's two-byte ADC value
in its library, but the 91 seems to do things differently. Does anyone have thoughts on how I can get this example to work with the 91?

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: TSL2591 for Electric Imp

Post by adafruit_support_mike »

The part numbers are similar, but the control interfaces are different. A TSL2561 library won't give you any help running a TSL2591.

Your best bet will be to use the Adafruit TSL2591 library as a working design reference: https://github.com/adafruit/Adafruit_TSL2591_Library

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”