adafruit / Adafruit_CircuitPython_TCA9548A

CircuitPython driver for the TCA9548A I2C Multiplexer.
MIT License
26 stars 15 forks source link

Issues with Circuitpython 9.2 and I2CDevice #54

Open rjauquet opened 2 weeks ago

rjauquet commented 2 weeks ago

Circuitpython 9.2 adds a probe method to check single i2c device addresses, which is causing this library to fail when initializing I2CDevice objects from adafruit_bus_device.

import adafruit_tca9548a

i2c = board.I2C()
hub = adafruit_tca9548a.PCA9546A(i2c)
channel = hub[0]
device = I2CDevice(channel, 0x42)
>> 'TCA9548A_Channel' object has no attribute 'probe'

I believe the 9.2 changelog references this change. https://github.com/adafruit/circuitpython/releases

Apologies if this is not quite the responsibility of this package. We've been using the TCA9548A_Channel as a drop in for i2c so I thought perhaps we just need to update this package with a probe method as a solution.