PCA9548 i2c multiplexer board and library
This repository contains the multiplexer board and an arduino library.
This module is useful when multiple i2c devices must be connected to a microcontroller but share fixed addresses, for example using several identical sensors with the same hardware-defined address. To solve this connect each offending sensor to different i2c buses and simply select the appropiate channel before communicating with the device as usual.
·The board has one input i2c channel and eight output ones. The input works at 5V level while the rest work at 3.3V. ·It has eight possible, hardware-defined I2C addresses, which are selectable through three solder pads, as in the following table:
·The pads on next to each connector enables that bus' 4.7k pullup resistors. These pads should be soldered if there were no other pullup resistors on the bus.
· To install the library simply copy the folder "I2CMux" into your folder "sketchbook/libraries/".
· The module's address is passed to the constructor, while the channel is selected by the method "switchToBus(busNumber)", with busNumber between 0 and 7.
· In the "examples" subfolder an example sketch is available which demonstrates how to switch between different i2c channels, reading data from two BNO055 sensors with the same address in different buses.