I am encountering a problem when trying to read data from multiple Qwiic ICM20948 sensors attached to different channels of a Qwiic Mux Breakout TCA9548A. The problem is that only one Qwiic ICM20948 sensor appears in the list_devices.
Running the following code:
test = qwiic.QwiicTCA9548A()
test.enable_all()
results = qwiic.list_devices()
print(results)
Thank you very much. I wrote the folling code and it seems to work. However, the delays are approx. 0.02 seconds per cycle. Is there a more efficint way to read the sensors to reduce the delay? Thank you very much
test = qwiic.QwiicTCA9548A()
test.disable_all()
test.enable_channels([0])
IMU = qwiic.create_device('QwiicIcm20948')
if IMU.connected == False:
print("The Qwiic ICM20948 device isn't connected to the system. Please check your connection", \
file=sys.stderr)
else:
IMU.begin()
test.disable_channels([0])
while True:
test.enable_channels([0])
if IMU.dataReady():
IMU.getAgmt()
test.disable_channels([0])
test.enable_channels([1])
if IMU.dataReady():
IMU.getAgmt()
test.disable_channels([1])