转自:https://www.raspberrypi-spy.co.uk/2014/08/enabling-the-spi-interface-on-the-raspberry-pi/spa
方案一:图形界面blog
Menu > Preferences > Raspberry Pi Configurationraspberry-pi
方案二:终端io
sudo raspi-config
方案三:修改文件(需重启)终端
引导根目录下:方法
config.txt
文本打开底部添加:
dtparam=spi=on
修正:上述方法不行
同打开文件config.txt
行45,以下:
# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=onim
修改成:img
# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on文件
想必你一眼就看懂了(本身当时真是傻,马马虎虎看config.txt)co