Trouble Coding for Mulitple I2C devices with TCA9548A Multiplexer

Hi,

I have multiple Adafruit STEMMA Soil Capacitance Soil Moisture Sensors that use an I2C connection, and as they have the same address and I want to use multiple sensors, I bought the multiplexer to address each sensor individually.

I understand the premise of using the "tcaselect(t)" function to call which port is being read, but I can't seem to get a working code going to read more than one sensor from the multiplexer.

I am also very new to coding using the arduino, and have mainly been harvesting code from others and trying to modify it to suit the Soil moisture sensor that I have.

If anyone is familiar with the Adafruit_seesaw library and understands what/how to call each sensor so that I can read the data from each sensor, that would be amazing!

Hopefully I've given enough information, cheers!

How many sensors do you have. They have the capability to change the i2c address from 0x36 to 0x39 so you can use 4 without any multiplexing.

What multiplexer did you purchase? The seesaw library is not the multiplexer but just a common framework to talk to all the adafruit sensors.

If you purchased their TCA9548A 1-to-8 I2C multiplexer, then Adafruit has a nice tutorial that you should read here