adafruit / Adafruit_TSL2591_Library

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

allow passing of specific SDA/SCL I2C pins to Wire begin via the TSL begin method #18

Closed hamishcunningham closed 6 years ago

hamishcunningham commented 6 years ago

This change allows passing of the I2C pins through the TSL begin method. It is needed for boards that put I2C on non-default pins (e.g. Heltech ESP32 Lora). It should be a backwards compatible (at source level).

ladyada commented 6 years ago

hiya, we wont take this because it breaks compatibility. if you want to send a PR where we can initialize with a Wire pointer, that would be considered :)

hamishcunningham commented 6 years ago

howdy! do you mean binary compatibility? at a source level you can still call begin() as before, because the parameters that we added are defaulted to -1 (which Wire.begin accepts and overwrites with board defined pins SDA and SCL)...?

ladyada commented 6 years ago

non-ESP board packages do not permit such assignments!

hamishcunningham commented 6 years ago

ok thanks, will have a think