Solution for "gpio readall" command unable to view Raspberry Pi 4B pin status
If you are a Raspberry Pi 4B enthusiast, you will encounter this problem during use Pi4. (This problem has troubled me for many days. The official Raspberry Pi method has not been able to modify the gpio version in my image. )
When using the Raspberry Pi to enter the gpio readall command to view the pin status, the system prompts:
The reason for this problem is that the current wiringpi version of the system didn’t support Raspberry Pi 4B, but this problem will not affect the function of all the pins we use to program Raspberry Pi.
The official Raspberry Pi responded to this problem with the official image and provided a solution.
Use the following command to update the version of wiringpi.
wget https://project- downloads . drogon . net/wiringpi - latest . deb
sudo dpkg -i wiringpi -latest . deb
If you are using the Raspberry Pi official image, this method may solve the problem. But if you use some other images configured, this method may not solve your problem, such Raspberry Pi smart car image. After installing the latest wiringpi, the gpio version is still 2.50 (older version), and the problem with gpio readall is still not resolved.
We will share another method here, I have tried many different images that can solve this problem.
1) Enter the Raspberry Pi system, we need to make sure that the Raspberry Pi can access the Internet normally. We can enter the command to determine if the Raspberry Pi can access the Internet normally. (Of course~, you can also ping other web addresses or some IP addresses)
As shown in the figure above, a normally ping indicates that the Raspberry Pi can access the Internet normally, and we can perform the following steps.
2) Input the following command to install Git.
sudo apt-get install git-core
Wait patiently for its installation to complete.
3) Input the following command to download the WiringPi file to the current directory on the Raspberry Pi system.
sudo git clone https://github.com/WiringPi/WiringPi
4) Wait patiently for its installation to complete. After the download is complete, we can see a WiringPi folder in the current directory. As shown below.
5) Input the following command to enter the WiringPi folder directory.
6) Input the following command to install WiringPi.
Wait patiently for its installation to complete. When we see following interface without any error, it means that the installation is complete.
7) Input the following command to view the version of gpio.
8) Finally, input gpio readall, we can display the status of each pin of Raspberry Pi, as shown in the figure below.