- Code: Select all | TOGGLE FULL SIZE
import board, busio, adafruit_mlx90393, adafruit_tca9548a
i2c = busio.I2C(board.SCL, board.SDA, frequency=100000)
tca = adafruit_tca9548a.TCA9548A(i2c)
mlx = adafruit_mlx90393.MLX90393(tca[7])
...
However everything works fine when I switch the TCA9548 "manually" and initialize the MLX90393 with an I2C object:
- Code: Select all | TOGGLE FULL SIZE
import board, busio, adafruit_mlx90393
i2c = busio.I2C(board.SCL, board.SDA, frequency=100000)
while not i2c.try_lock():
pass
buf = bytearray([0x80,])
i2c.writeto(0x70, bug) # set the TCA9548A (addr=0x70) channel
i2c.unlock()
mlx = adafruit_mlx90393.MLX90393(i2c)
...
Would anybody know how to fix that?
TIA, Beat