I'm using TCA9548 multiplexer to control MLX90640 sensors (multiple sensors with same address). As I know, one TCA9548 can connect 8 I2C slave devices (here, my sensors, all with same address). How to access each slave device by TCA9548? Or is it possible to change the address of MLX90640?
Basically it tells you what to do in the TCA9548 data sheet. First you tell the TCA9548 what channel to use. The TCA9548 has its own address which you can set three bits of it by external pins on the TCA9548.
Then you just talk to the sensor at its own address. The signals then get switched to the corresponding sensor.
Do you really have a TCA9548 or some board that uses a TCA9548? It matters that you give correct and complete information when asking questions.
You have to get the sensor readings one at a time. Without the multiplexer, or if you enable more than one channel of the multiplexer at the same time, it would be like several people (with identical voices) all speaking at once: you would not be able to understand what any of them are saying and even if you could, you would not be able to tell which individual you had heard.
Is it possible that I can get the results from all these sensors at the same time
No.
Or I can get them only one after the other?
Yes.
You can’t do more than one thing at the same time on an Arduino as there is only a single core in the processor.
Or is it possible to change the address of MLX90640?
Even if you could change the address you can only read them one at a time.
I think you misunderstood what multiplexing is all about. It’s full name is time division multiplexing, it gives a time slice to each device in turn. If this is done fast enough with the right sort of device, like an LED, it looks like they are all on at the same time due to your persistence of vision.
Unlikely. But there will be separate code for each device, and example code that demonstrates the multiplexer being used with other sensors. The multiplexer is not difficult to use and many people will not bother to use a library for it (other than the Wire library, of course).