Getting wrong values when reading data from sensors with i2C TCA9548A i2C multiplexer getting bad values from BMP180 sensors multuplexer TCA9548A

Follow the DRY principle: Don't Repeat Yourself.

Write code once for one sensor, then instead of copy&paste that code for every further sensor of the same type make your code work with any number of sensors. In a for loop the index variable indicates the currently active sensor number. What else must be known to distinguish multiple sensors?