The TCA9548A is an 8-channel I²C multiplexer that allows multiple I²C devices with the same address to be connected to a single microcontroller. This is essential for advanced sensor arrays, robotics, weather stations, and large data acquisition projects.

Wiring summary: Connect VCC to 3.3 V (ESP8266) or 5 V (Arduino), GND to ground, SDA → A4 (Arduino) or D2 (ESP8266), and SCL → A5 (Arduino) or D1 (ESP8266). Each channel (CH0–CH7) connects to an independent I²C bus.
// Example: Using Adafruit_TCA9548A with Arduino
#include <Wire.h>
#include <Adafruit_TCA9548A.h>
#include <Adafruit_BME280.h>
Adafruit_TCA9548A tca = Adafruit_TCA9548A();
Adafruit_BME280 bme;
void setup() {
Serial.begin(115200);
Wire.begin();
tca.begin();
for (uint8_t i = 0; i < 8; i++) {
tca.openChannel(i);
if (bme.begin(0x76)) {
Serial.print("BME280 found on channel ");
Serial.println(i);
}
tca.closeChannel(i);
}
}
void loop() {
for (uint8_t i = 0; i < 8; i++) {
tca.openChannel(i);
Serial.print("Channel "); Serial.print(i);
Serial.print(": Temp = ");
Serial.println(bme.readTemperature());
tca.closeChannel(i);
delay(1000);
}
}
i2c:
sda: D2
scl: D1
scan: false
tca9548a:
- id: mux0
address: 0x70
sensor:
- platform: bme280
temperature:
name: "BME280 Temp CH0"
address: 0x76
i2c_id: mux0
channel: 0
- platform: bme280
temperature:
name: "BME280 Temp CH1"
address: 0x76
i2c_id: mux0
channel: 1
Ships within 1 business day. Free UK shipping or low-cost international delivery. Returns accepted
Need multiple units for a project or classroom? Message for bulk pricing!