Can a sensor with a I2C output be used with arbitrary GPIO pins on the Raspberry Pi?
For example, what about the Sht31 temperature/humidity sensor: https://www.adafruit.com/product/2857
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.Sign up to join this community
The Pi3 has two hardware I2C buses only one of which should normally be used (one bus is reserved for HATs.)
Additionally there is device tree support for software I2C buses on arbitrary GPIO.
For both the above you need to make configuration changes in
/boot/config.txt as documented in
Additionally there are many software I2C implementations which may be useful in special circumstances (e.g. my pigpio library with bit bang I2C).