python - TCA9548A I2C 多路复用器与 ADS1100 使用 python 和树莓派
问题描述
我想使用 Adafruit 的 tca9548a 多路复用器: https ://github.com/adafruit/Adafruit_CircuitPython_TCA9548A
连同 ads1100 adc: https ://www.ti.com/lit/ds/symlink/ads1100.pdf?ts=1634723422799&ref_url=https%253A%252F%252Fwww.google.com%252F
在 RPI4 上。使用 adafruit 提供的 i2c 扫描仪可以很好地识别 tca9548 和 ads1100: https ://github.com/adafruit/Adafruit_CircuitPython_TCA9548A/blob/main/examples/tca9548a_simpletest.py
但是,我不能使用 smbus 库通过以下代码示例访问 adc: https ://github.com/ControlEverythingCommunity/ADS1100/blob/master/Python/ADS1100.py
因为我无法将 tca[0] 对象提供给 # Get I2C bus bus = smbus.SMBus(1)
它只接受整数。有什么想法可以使用 adafruit 库指向 ads1100 寄存器吗?
本主题解决了它:How to read from multiplexer with python I2C TCA9548A
解决方案
推荐阅读
- rstudio - R Studio 启动后如何自动加载文件进行编辑
- python-3.x - 正则表达式在 python 中规范化这些拼写
- linux - 没有目标通过时打印默认目标
- python - 仅具有一维的多维“X”和“y”的绘图误差
- amazon-web-services - 我可以将 Amazon LEX 与 Google 助手一起使用吗?
- c - 用于 C 运行时动态链接的 Matlab 引擎 API
- javascript - ng-if="x" 被渲染,ng-if="x != false" 没有被渲染?
- python - 如何定位 JSON 中的特定值并比较时间
- javascript - addEventListener 到 div 和图像数组,运行和暂停
- c# - 由于预期的 cookie,nSubstitute 问题模拟 httpContext 和会话