树莓派4B gpio readall 出现Oops – unable to determine board type… model

树莓派使用GPIO接口是基于wiringPi的;官网链接:http://wiringpi.com/

1:使用GPIO时出现问题的界面

pi@raspberrypi:~ $ gpio -v
gpio version: 2.50
Copyright (c) 2012-2018 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Raspberry Pi Details:
  Type: Unknown17, Revision: 01, Memory: 0MB, Maker: Sony 
  * Device tree is enabled.
  *–> Raspberry Pi 4 Model B Rev 1.1
  * This Raspberry Pi supports user-level GPIO access.
pi@raspberrypi:~ $ gpio readall
Oops – unable to determine board type… model: 17
2:问题是wiringPi版本为识别树莓派4B版本类型;需要按照官网指引升级版本如下:

打开树莓派终端输入:

cd /tmp
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
然后再:

pi@raspberrypi:/tmp $ gpio readall

发表评论