0

My use-case is to have multiple sensors with the same I2C address attached to the PI and also a LED screen that I want to attach on it's own. I found that there is a software level overlay BUT it is super slow and I am looking to see if there is a way to activate any of the PI pins as I2C pins on the hardware layer.

Links and things already tried
[1] https://www.raspberrypi.org/forums/viewtopic.php?t=295392
[2] Pi Zero W: Second i2c Bus
[3] https://github.com/raspberrypi/firmware/blob/master/boot/overlays/README#L1409-L1455

1 Answer 1

0

The Pi Zero has two hardware I2C buses.

Bus 0 (/dev/i2c-0) uses GPIO 0/1. Bus 1 (/dev/i2c-1) uses GPIO 2/3.

You can probably use bus 0 as well as bus 1 on a Pi Zero.

An alternative to consider is an I2C bus multiplexor such as the TCA9548A which will allow you to have up to 8 devices sharing the same I2C address.

If the software I2C bus seems super slow that suggests you have unrealistic expectations or have done something wrong.

2
  • thank you for the suggestions, I will research the multiplexer approach. For the slowness, all I have done is issue an i2c scan. Scanning bus 0 is immediate, scanning a new bus using a software controller takes many minutes. I have not used pull-ups, perhaps that is the issue? Sep 18, 2021 at 17:53
  • bus1 is reserved, I tried using it but it's a complete pain the butt, and I either fried or broke the I2C controller on an LED screen trying to utilize that bus. Googling for it revealed many frustrations and solutions difficult. Sep 18, 2021 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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