樹莓派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總線啦。