You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need 3 sensors, but there are unfortunately only 2 I2C addresses. So i have to use SPI instead of I2C. Is there a way to use the same library in SPI?
The text was updated successfully, but these errors were encountered:
As much as I hate to say it - since we only provide breakouts that use the i2c interface and this library is strongly i2c focussed - I'm afraid I can't support use over SPI.
Then you can initialise the BME680 library with your new i2c bus like so:
from smbus import SMBus
from bme680 import BME680
bme680 = BME680(i2c_device=SMBus(N))
SPI support is something I would consider reviewing and merging a PR for, however, since I know many people using breakouts not manufactured by us use this library and may want this feature.
This scenario happened to me too. I ended up using the TCA9548A I2C Multiplexer to get this accomplished. Worked like a charm. If you are quick pintch in a hurry you can use a GPIO to power the sensor (it requires really low current so a gpio pin set to high is enough) and just cycle them from high to low sequentially to get all measurements.
I need 3 sensors, but there are unfortunately only 2 I2C addresses. So i have to use SPI instead of I2C. Is there a way to use the same library in SPI?
The text was updated successfully, but these errors were encountered: