Does Raspbian come out of the box with some GPIO library for C, or if not, does it have any in the standard repository?

Sure I could just download and compile any of the libs on my own from .tgz but then I lose auto-updates and the likes, so I thought I'd ask first.


There is a Python GPIO library in the package repository of Raspbian, but no C or any other counterpart at this time.

You can search for them yourself my typing:

$ apt-cache search gpio

If you understand how the GPIO works, you will notice that you can access the main functions using the file system mapping, just by reading and writing into files in the file system. This option is auto-updated together with the kernel and modules.

You can always use direct register access to use the GPIO, as described in the elinux RPi Low Level page, but I don't think that would help you achieve your objective though.


If you are looking for something comparable to Arduino, consider looking at WiringPi. WiringPi is an Arduino wiring-like library written in C and released under the GNU LGPLv3 license. The code example looks very similar to code written for the Arduino.

You could also take a look at the bcm2835 library. The example code looks pretty simple.

Just some extra suggestions to those already out there.

  • I know both, and can install them from tarballs just fine, but does either of them come as .deb package for Raspberry? If so, what is the package name? Neither apt-cache search bcm2835 nor apt-cache search WiringPi return anything.
    – SF.
    Aug 6 '13 at 11:33
  • To my knowledge, no.
    – syb0rg
    Aug 6 '13 at 15:00

i program in python however i believe a quick google search of


should provide you with what you need plus some very useful extras such as software pwm etc.

  • I see no .deb packages, apt repositories or any of the like. Just plain old tarballs. "Installation seems to be a key issue, so I’ll be looking at providing a .deb package for Raspbian – I know there is already a package available for Arch, but things are changing quite rapidly right now." - Posted on March 11, 2013 by Gordon.
    – SF.
    Aug 22 '13 at 11:31
  • I was able to install the WiringPi module using the git method. github.com/WiringPi/WiringPi-Python here is the repositry, instructions are shown in the readme section. mind it is worth also using the update function to ensure you have the latest version.
    – D Mason
    Aug 22 '13 at 11:36

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.