Use of Raspberry Pi Board

Posted on 30/06/2023 by Riley224
Modified on: 17/06/2024
Project
Press to mark as completed
Components you will need
Select missing items to add them
to the cart or select all
Introduction

If you are a Raspberry Pi 4B enthusiast, you will definitely encounter these problems in the process of using Pi4.


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.

cd /tmp
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)

ping www.baidu.com

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.

cd WiringPi/

6) Input the following command to install WiringPi.

sudo ./build

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. 

gpio -v

8) Finally, input gpio readall, we can display the status of each pin of Raspberry Pi, as shown in the figure below.

LikedLike this to see more

Spread the word

Flag this post

Thanks for helping to keep our community civil!


Notify staff privately
It's Spam
This post is an advertisement, or vandalism. It is not useful or relevant to the current topic.

You flagged this as spam. Undo flag.Flag Post