【问题标题】:Raspberry Pi 2 - cannot enable /dev/i2c-0Raspberry Pi 2 - 无法启用 /dev/i2c-0
【发布时间】:2015-08-15 05:40:53
【问题描述】:

我在 raspberry pi 2 上有点敲打有问题,我已经完成了所有这些步骤:

*sudo nano /etc/modprobe.d/raspi-blacklist.conf  //#blacklist i2c-bcm2708

*sudo nano /etc/modules //Add the Line i2c-dev at the end of the file。 *编辑/boot/cmdline.txt 文件:sudo nano /boot/cmdline.txt //在行尾添加bcm2708.vc_i2c_override=1,当我运行ls /dev/i2c* 时,我只得到/dev/i2c-1. 任何想法?我正在使用 Raspberry pi 2.thanks

我希望看到/dev/i2c-1/dev/i2c-0 而不仅仅是/dev/i2c-1

【问题讨论】:

标签: python raspberry-pi i2c


【解决方案1】:

你必须添加

dtparam=i2c_vc=on

/boot/config.txt

以纳米为例

sudo nano /boot/config.txt

然后我可以在运行 Debian Wheezy 版本的 Raspberry Pi 2 上看到两个 i2c 接口。

稍后您在检测总线上的 i2c 设备时可能会遇到问题。请查看 Raspberry Pi 官方论坛上的此主题以及后续步骤。 i2c-0 on Raspberry Pi 2 Model B

那些 gpios 没有外部上拉到 3V3。他们将默认为 内部 50k 上拉至 3V3,但不足以驱动 公交车。我会尝试在每个引脚上添加一个 2k 上拉到 3V3(i2c-1 有 外部 1k8 上拉到 3V3)。

【讨论】:

  • 非常感谢,但 i2cdetect -y 0 没有显示任何问题
  • I2C0 引脚是 27 和 28,我应该做上拉电阻吗?
  • 是的,看起来是这样。请看这个帖子raspberrypi.org/forums/…
  • 引脚是 27 和 28 还是 28 和 29 ?
  • 根据我之前评论给你的链接SDA=27和SCL=28。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-08-15
  • 2022-07-06
  • 1970-01-01
  • 2016-12-14
  • 2016-01-16
相关资源
最近更新 更多