This is really no different than the example with three devices. There's just one more BME280 device added. But hopefully this example helps reinforce the idea that adding yet-another-same-address-device is a simple matter of connecting it to an available channel on the TCA9548A and adding a few more lines of code. So by looking at the three BME280 example and then the four BME280 example, one can expand this to five, six, etc. BME280s.
Here's the setup:
Why stop at 4 BME280s? Or even 8? A single TCA9548A can support up to 8 total same address devices. By using multiple TCA9548As, each with its own I2C address, more than 8 same address devices can be used. There are 8 total settable addresses for the TCA9548A, with values 0x70 to 0x77. So the grand total of same address devices that could be used is 8 TCA9548As x 8 output channels each = 64.
Text editor powered by tinymce.