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!