2

With my raspbian I used to use the command gpio. Unfortunately, I forgot how I installed it, or if it came installed by default in Raspbian.

Now I'm playing with UbuntuCore for RaspberryPi, and I have the need of using this command again, but it's not clear how to install it.

By googling around, I've seen people recommending installing these packages:

sudo apt-get install python-pip python-dev
sudo pip install RPi.GPIO
sudo pip install wiringPi
sudo pip install gpio

But that doesn't bring the gpio command, apparently.

The commands I want to launch via gpio are this kind:

gpio mode 0 out
gpio write 0 1
gpio write 0 0

How can I install gpio?

knocte
  • 157
  • 1
  • 1
  • 8

5 Answers5

4

A little bit late, but as can be found here: http://wiringpi.com/download-and-install/ simply type

sudo apt-get install wiringpi

This installs the gpio command.

Dmitry Grigoryev
  • 28,277
  • 6
  • 54
  • 147
Rene
  • 41
  • 1
2
docker run --rm --device /dev/ttyAMA0:/dev/ttyAMA0 --device /dev/mem:/dev/mem --privileged -ti python:2 /bin/sh
apt-get update && apt-get install git-core sudo
git clone https://github.com/WiringPi/WiringPi --depth 1
cd WiringPi/
./build
gpio readall
2

sudo pip install won't work, because it is NOT a Python program.

The following answer explains how to install it and also how to get the missing man pages. https://raspberrypi.stackexchange.com/a/51378/8697

Milliways
  • 62,573
  • 32
  • 113
  • 225
0

I think your pip is pip3 you can try this code.

sudo apt install python-pip3 python-dev
sudo pip3 install RPi.GPIO
sudo pip3 install wiringPi
sudo pip3 install gpio
MatsK
  • 2,882
  • 3
  • 17
  • 22
pradip
  • 1
0

This is wiringpi.com.

As of the end of 2023, you'll not find anything here anymore. It's gone.

Email if you want - if you know my email address. Work it out.

-Gordon

d3vopz
  • 1