How to connect to two identical sensors with Qwiic system?

I’m totally new to this, just ordered some sensors and a SparkFun Qwiic pHAT v2.0 for Raspberry Pi.

I’m trying the tutorial here https://learn.adafruit.com/adafruit-tmp … VUQAvD_BwE and I can connect to three of my sensors no problem.

But when I add two sensors of the same type (e.g. two TMP117’s) only one shows up. Here is my code:

import time
import board
import busio
import adafruit_tmp117

devices = {
    0x23: 'BH1750 Light Sensor',
    0x48: 'TMP117 Temperature sensor',
    0x76: 'BME280 Temp/Barometric/Humidity',
    0x77: 'BME280 Temp/Barometric/Humidity'
}

i2c = busio.I2C(board.SCL, board.SDA)
addresses_found = i2c.scan()
print(f"Devices found:")
for a in addresses_found:
    print(f"{hex(a)}: {devices[a]}")

Actual output:

Devices found:

0x23: BH1750 Light Sensor

0x48: TMP117 Temperature sensor

0x77: BME280 Temp/Barometric/Humidity

Expected output:

  • I expected 4 sensors, including 2 TMP117s!

Did you change the I2C address of one of the TMP117 sensors from the default of 0x48? You can’t have multiple devices with the same I2C address.

Oh I see thanks. Now I’m looking for an explanation of how to do that…

This forum post says it’s not possible:

  • - https://forum.arduino.cc/t/changing-i2c … /882762/17
  • Did Sparkfun really not add in the capability to use multiple of the same sensor

    They really did not.

    I can’t seem to find a tutorial on this aspect.

    https://learn.adafruit.com/adafruit-tmp … or/pinouts describes how to change the I2C address of the TMP117

    ADDR/AD0 Jumper - I2C Address pin. Pulling this pin high or bridging the solder jumper on the back will change the I2C address from 0x48 to 0x49