I'm looking at communicating with sensors via Adafruit TCA9548A breakout.
Mr Wood posted this great class: How to use Adafruit TCA9548A 1-to-8 I2C Multiplexer Breakout in C#?
It seems to be selecting the device and channels fine, my issue is after a successful connection, how would I address the device i would like to communicate with?
I have 3 of the same sensor connected to different channels on the multiplexer.
From Python or Arduino C, each transmission of communication states the address to communicate with, however in C# I have to define this before any read/write is done.
The problem I have is that it seems to me when I communicate with my sensor, I am sending a byte which is switching the channel on the multiplexer and then communicating with the wrong sensor. I'm getting data just its coming from the wrong sensor. The sensor I seem to continuously get data from is the sensor on channel 2.
I am completely stuck. I have tried initialing the I2C device each time I want to communicate with it, I tried sharing the I2C device between all the sensors (current setup) nought.