樹莓派3B開啟I2C接口

樹莓派3B開啟I2C接口

使用PCF8591模組(AD/DA轉換模組、類比/數位轉換模組)的時候需要用到I2C接口,但是買回來的樹莓派默認沒有啟用這個接口,只好手動開啟。

sudo raspi-config

然後配置:

  • 選擇 5 Interfacing Options - Configure connections to peripher

  • 選擇 P5 I2C - Enable/Disable automatic loading

  • 看到提示 would you like the ARM I2C interface to be enabled? 選擇 Yes

  • 看到提示 The ARM I2C interface is enabled 選擇OK

  • 回到配置的第一個介面,選擇Finish

啟用好了I2C接口後,用 i2cdetect -l命令就能看到樹莓派上的I2C總線啦。

Y Cheung

Y Cheung

Blogger, Programer & Traveler.
Shanghai