Allow choice of Wire, Wire1, Wire2 to use different wire (like Teensy 4.1)
fo8x opened this issue · comments
fo8x commented
Hello !
if it's possible to add a choice of the Wire use to transmit data ?
defaut we use Wire.begin() and Wire library, but like teensy4.1, we can use 3 i2c channel different. Can we add a variable in the definition of the sht ? like SHTSensor sht(Wire1);
Thanks
Johannes Winkelmann commented
We should probably add an example, but the feature is already there: You can do this by passing an alternative TwoWire interface to the init() function:
https://github.com/Sensirion/arduino-sht/blob/master/SHTSensor.h#L121