I should point out that I checked the I2C communication with the multiplexer using the code below and, as it turns out, the IMUs are visible to the arduino board.
The code for checking the multiplexer communication:
#include "Wire.h"
extern "C" {
#include "utility/twi.h" // from Wire library, so we can do bus scanning
}
#define TCAADDR 0x70
void tcaselect(uint8_t i) {
if (i > 7) return;
Wire.beginTransmission(TCAADDR);
Wire.write(1 << i);
Wire.endTransmission();
}
// standard Arduino setup()
void setup()
{
while (!Serial);
delay(1000);
Wire.begin();
Serial.begin(115200);
Serial.println("\nTCAScanner ready!");
for (uint8_t t=0; t<8; t++) {
tcaselect(t);
Serial.print("TCA Port #"); Serial.println(t);
for (uint8_t addr = 0; addr<=127; addr++) {
if (addr == TCAADDR) continue;
uint8_t data;
if (! twi_writeTo(addr, &data, 0, 1, 1)) {
Serial.print("Found I2C 0x"); Serial.println(addr,HEX);
}
}
}
Serial.println("\ndone");
}
void loop()
{
}
After running the above code I get:
*TCAScanner ready!
TCA Port #0
Found I2C 0x1F
Found I2C 0x21
TCA Port #1
Found I2C 0x1F
Found I2C 0x21
TCA Port #2
Found I2C 0x1F
Found I2C 0x21
TCA Port #3
Found I2C 0x1F
Found I2C 0x21
TCA Port #4
Found I2C 0x1F
Found I2C 0x21
TCA Port #5
Found I2C 0x1F
Found I2C 0x21
TCA Port #6
TCA Port #7
*
The result above basically says that at ports 0, 1, 2, 3, 4 and 5 there are two different devices at 0x1F (accelerometer and magnetometer) and 0x21 (gyro).
So, my assumption is that the problem lies somewhere in the Adafruit's libraries