【发布时间】:2020-05-28 04:13:27
【问题描述】:
我有 2 个 VL6180X 距离传感器正确连接到 TCA9548A 多路复用器,但它只能识别多路复用器本身,而不是 0x70 中看到的 2 个传感器。有什么方法可以配置 i2c 地址吗?
i2cdetect -y 1
给我以下输出
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
Ofc,我确实已经在网上搜索过它的解决方案:
我安装了
sudo apt-get install -y python-smbus
sudo apt-get install -y i2c-tools
我在内核中启用了 i2c (https://raspberrypi.stackexchange.com/questions/66145/raspberry-pi-3-not-detecting-i2c-device)
将所有内容添加到 config.txt 中,如下所示: I2C not detecting ? issues in hardware or any other?
【问题讨论】:
-
您必须在内核中启用 I2C 多路复用器 驱动程序,然后为您的传感器启用驱动程序。如果没有驱动,你必须写一个。
标签: raspberry-pi i2c multiplexing