Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow choice of Wire, Wire1, Wire2 to use different wire (like Teensy 4.1) #25

Closed
fo8x opened this issue Sep 1, 2022 · 1 comment
Closed

Comments

@fo8x
Copy link

fo8x commented Sep 1, 2022

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

@winkj
Copy link
Member

winkj commented Sep 1, 2022

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

@winkj winkj closed this as completed Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants