EDIT: I ran an i2c bus scanning program and it detected a device at 0x70 (the mux). I connected the device I am trying to interface with directly to the i2c bus and ran this code and it worked exactly as expected. But still when I run this code with the device attached to one of the mux channels, it does not work. I'm stumped!
I am trying to control an I²C device via a multiplexer on an ESP8266. Below is the circuit I'm using and the code. This exact code works if I change the device to be connected directly to SDA and SCL (bypassing the multiplexer). Unfortunately, if connected via the multiplexer, the code outputs "No TCS34725 found." I have tried this on two distinct boards with the same results on both.
Reset (N$5) is pulled up to 3.3v via a 10k resistor.
#include <Wire.h>
#include <Adafruit_TCS34725.h>
#define TCAADDR 0x70
uint16_t clear, red, green, blue;
Adafruit_TCS34725 tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_2_4MS, TCS34725_GAIN_1X);
void setup() {
Wire.begin();
Serial.begin(115200);
delay(10);
Serial.println("\r\n");
tcaselect(6);
if (tcs.begin()) {
Serial.println("Found sensor");
} else {
Serial.println("No TCS34725 found ... check your connections");
while (1); // halt!
}
}
void tcaselect(uint8_t i) {
if (i > 7) return;
Wire.beginTransmission(TCAADDR);
Wire.write(1 << i);
Wire.endTransmission();
}
Any ideas on why this isn't working?



