• First Steps
  • General
  • Projects
Facebook Twitter YouTube
Tutorials for Raspberry Pi Tutorials for Raspberry Pi
  • Hardware & GPIO
  • Sensors & Components
  • Scale
  • Cases
  • Fingerprint
  • Gas Sensor
  • Heartbeat
  • German
Tutorials for Raspberry Pi Tutorials for Raspberry Pi
Home»Hardware & GPIO»Installing WiringPi (and pin allocation) – Raspberry Pi

Installing WiringPi (and pin allocation) – Raspberry Pi

Facebook Twitter LinkedIn Tumblr Email Reddit
Share
Facebook Twitter LinkedIn Email Tumblr Reddit Telegram WhatsApp

WiringPi is a library that is used by many applications on the Raspberry but is not available by default. Especially many examples from the Arduino (C ++ code) can be performed easily on the RaspberryPi. To do so, this valuable library was written.

 

Install

Your PI should be up-to-date, therefore:
sudo apt-get update && sudo apt-get upgrade

Now we need git:

sudo apt-get install git git-core

Now we need git: Now WiringPi can be downloaded and installed:

git clone git://git.drogon.net/wiringPi
cd wiringPi
./build
That’s it. To later upgrade to a newer version you can type the following command in that folder:
git pull origin
./build

and the latest version is installed.

 

Pin allocation

The pin assignment of wiringPi is not the same as that of the GPIOs.

To get information about your Raspberry Pi you can enter this command:

gpio -v

The easiest way to output the pin allocation is typing

gpio readall

because it is different on the various models.

 

Here the pin assignment for Rev. 1 and Rev. 2:

pinbelegung-wiringpi

arduino C# wiring pi
Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Previous ArticleRaspberry Pi Remotedesktop Verbindung
Next Article Raspberry Pi und I2C Luftdrucksensor BMP180

Related Posts

Control all GPIOs with the Raspberry Pi REST API via Python

How to build a ESP8266 Scale (with Weight Sensor HX711)

Using TensorFlow Lite with Google Coral TPU on Raspberry Pi 4

How-To: Bluetooth Connection between ESP32’s and Raspberry Pi’s

8 Comments

  1. Skizzlebits on 12. March 2020 18:10

    Every time I enter “git clone git://git.drogon.net/wiringPi” into the Pi, it just error codes. I’m on a Pi 3 model B if that factors into the access somehow. Any idea why that may be happening?

    Reply
    • jeff on 19. April 2020 3:12

      I am having the same problem, im a newb like a full linux/unix newb so all this sudo bla bla and stuff i have no clue, so little more help from new pi 3b with noobs default os python2 and 3 are installed, i did manage to some how got pycharm installed but all them i have no clue, when say run sample, how? do i just use terminal window or do i use pyhton3 to do all the installing and stuff, i have spi and headless and stuff setup in the rasp-config, i have 1 red 8×8 MAX7219 matrix display with driver board and i want to run a marquee or kinda message or simple pictures or both, when i did a pi reboot it light up all lights on the matrix thats all and that was few secs after applying power but im newb so i needs help please!

      Reply
    • Roberto on 9. June 2020 7:30

      I’m having the same problem. When I type it clone git://git.drogon.net/wiringPi”
      fatal: unable to connect to git.drogon.net ….. connection refuse.

      Reply
    • geno on 25. June 2020 21:13

      read this: http://wiringpi.com/news/

      if you browse to the download site you get:
      http://git.drogon.net/ is currently unavailable.

      Please look for alternatives for wiringPi, etc.

      (I really mean look for an alternative – as in use another GPIO library. also read the news on http://wiringpi.com/news )

      -Gordon

      Reply
      • Bhavesh on 6. January 2021 16:44

        you can use http://www.airspayce.com/mikem/bcm2835/ for interfacing with the GPIO.
        So far the wiring PI still works. There are no major changes on RPI4

  2. Geovanni on 25. July 2020 19:38

    hay que cambiar a este repositorio github.com/WiringPi/WiringPi

    Reply
  3. carlos valladares on 27. July 2020 6:01

    https://github.com/WiringPi/WiringPi

    Reply
  4. raspiwo on 9. December 2020 2:41

    Cloning a git repo is not the primary method for installing software on a pi system!

    wiringpi should be kept in the OS repositories, so that we can do “apt install wiringpi”.
    Until the maintainers re-add it there, I download the deb from http://archive.raspberrypi.org/debian/pool/main/w/wiringpi/ and install it manually (“sudo dpkg -i wiringpi_2.50_armhf.deb”).

    Reply

Leave A Reply Cancel Reply

Build a digital Raspberry Pi Scale (with Weight Sensor HX711)

How to Build Your Own Raspberry Pi Android TV Box

Raspberry Pi Pico: Programming with the Affordable Microcontroller

Setting up Raspberry Pi 4 Wi-Fi and Bluetooth

Develop Your Own Raspberry Pi Alexa Skill and Control Pi Remotely

Raspberry Pi Heartbeat / Pulse measuring

Subscribe to Blog
Subscribe to Raspberry Pi Tutorials and don't miss any new Tutorial!
Subscribe

Thank you!

We will contact you soon.

Tutorials for Raspberry Pi
Facebook Twitter YouTube
  • Contact & Disclaimer

Type above and press Enter to search. Press Esc to cancel.