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?

  • The tool that provides a syntax you describe should come with wiringpi wiringpi.com/the-gpio-utility – Ghanima Aug 27 '16 at 23:40
  • I already said that I installed wiringPi through sudo pip install and that doesn't make gpio command appear – knocte Aug 27 '16 at 23:41
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

| improve this answer | |
  • wiringpi doesn't seem to be available for this version of ubuntu (ubuntu-core snappy?) – knocte Aug 28 '16 at 2:07
  • 1
    If it is not in the distribution, you can always install it from source wiringpi.com/download-and-install – Milliways Aug 28 '16 at 2:30
0

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.

| improve this answer | |
New contributor
Rene is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.