Allow setting the I2C address register as kwarg #7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the kwarg
addr_reg
, multiple sensors can be used on one bus without fiddling with the ADDR/SDA line. The sensors ADDR register is set to its value upon initialization.Each sensors VCC has to be connected to a GPIO pin. Sensors can then be enabled one by one, setting a new address each time. Up to 4 sensors can be used on one bus this way.
Example, VCC of TLV493Ds connected to D4 and D17:
It's surely not as nice of an API as it could be, but I didn't really have a better idea on an easy way to get multiple sensors working.