Si7021 with Mux

Hey guys,

I need to read out at least 4 Sensors Si7021. Since they have fixed adresses, i have to use a multiplexer (adafruit). Has anybody done this before and can sent me some working code? I didn't find a library where i can set the adress for the sensor manually...

thanks in advance!
greetz, chris

It might help to have links to the hardware you're writing about.

Sensor is equivalent to

and the Mux is equivalent to

I have used the library

which worked fine for only one sensor....

Simply select the correct I2C bus by sending one byte to the TCA9548A's address (depends on the connection you made for the three address pins). Every bit of that byte you send corresponds to one output bus which mean you can select multiple buses to be active at the same time (if you need that). The page at Adafruit you linked to contains an example of the code you can use for that. After you sent that to the TCA9548A the selected bus(es) are active and everything sent out is sent to that bus except if the address is that of the TCA9548A itself.

Hey @atsteich ,

Is there any update on your codes?