I am trying to interface bme280 & tsl2561 together with Pi Zero. I have connected bme280 to Pi Zero on Pin 3-I2C.1 SDA & Pin 5-I2C.1 SCL and was able to read the data over i2c. Also want to add tsl2561 to read LUX. Can I use Pin 27-I2C.0 SDA & Pin 28-I2C.0 SCL for tsl2561

Is it possible ?

closed as unclear what you're asking by Milliways, Aurora0001, SlySven, Darth Vader Dec 21 '18 at 15:19

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What is a bmc280? If the devices use different I2C addresses that should be possible. – Dirk Dec 16 '18 at 0:16
  • updated my question – roy Jan 18 at 2:36

More than one device can be used on a Pi I2C bus provided that:

  1. They can be configured to have different I2C addresses.
  2. They can operate with a 3V3 bus.
  3. They do not have their own I2C pull-ups to more than 3V3 (ideally they should have no pull-ups at all).
  4. They use 8-bit I2C addresses (the normal case, you rarely see 10-bit address devices).

If your devices do not meet any of 1-3 you could connect them via a bus multiplexer e.g. a PCA9547.

If your devices do not meet 1 you could create a software I2C bus on any pair of spare GPIO and transfer the clashing device to that bus. See /boot/overlays/README for details. You would need to add your own pull-up resistors to 3V3 on the GPIO you use. For reference the Pi uses 1k8 resistors on the hardware I2C bus on SDA and SCL. You might get away with enabling the internal 50k pull-ups on the GPIO for testing purposes.

Not the answer you're looking for? Browse other questions tagged or ask your own question.