I have been trying to figure out how to modify the code here: https://electricimp.com/docs/resources/i2c/ to work with a TSL2591 instead of the 2561. The only difference AFAIK is that the 2591 uses a fixed i2c address of 0x29. I’m not sure if any of the registers are different. I tried changing them to reflect the tsl2591’s Arduino library, which I know works.
The device code gets as far as the power check (and it returns 3). The next step is:
// Set command focus to the timing register
and it just hangs there. It seems this must be an issue with the “TSL2561_REGISTER_TIMING”, which doesn’t seem to exist in the 2591 .h file. Maybe the 2591 handles timing differently than the 2561?
Any help greatly appreciated!