adafruit / Adafruit_TSL2591_Library

This is an Arduino library for the TSL2591 digital luminosity (light) sensors.
58 stars 48 forks source link

manually set i2c adress #41

Closed smnmsr closed 3 years ago

smnmsr commented 3 years ago

The scope of the change is to be able to manually set the i2c adress of the sensor. Since you're able to change the i2c adress with jumpers on some version of this board, it is necessary to be also able to change the adress within the code. If no adress is set and the libary is handled the same as before, the change has no impact.

The code has no known limitations.

The code worked fine on tests.

ladyada commented 3 years ago

hi thanks: we're into it! we like to put the address setting in begin() not in the instantiation can you make the change so we have the library begin() look like this one (for a different chip) https://github.com/adafruit/Adafruit_AW9523/blob/master/Adafruit_AW9523.h#L46

smnmsr commented 3 years ago

@ladyada like this?

ladyada commented 3 years ago

yes! Great work