My main interest in using the RPi is to access the GPIO pins so that I can interface with electronic projects. For reference here’s the GPIO map from elinux.org:
The pins are all explained in detail at http://elinux.org/RPi_Low-level_peripherals.
So here’s what I did to set up access to the GPIO pins using C and Python.
This is a fantastic library written by Gordon Henderson that allows access to the GPIO pins. It has its own web pages at:
To install simply follow the instructions on Gordon’s site.
There are various wrappers for WiringPi so that it can be accessed from other languages. I’m learning Python so I obtained the wrapper using git:
git clone https://github.com/Gadgetoid/WiringPi2-Python.git
In order to install you need some tools installed on your RPi
sudo apt-get install python-dev python-setuptools swig2.0
Then issue the command from inside the WiringPi2-Python directory:
and it will install.
The I2C interface is not activated by default in the Raspbian kernel, follow the adafruit guide to get it up and running:
Install the Adafruit WebIDE
Although not necessary to get your RPi up and running, the WebIDE is a very useful tool for running your programs from any PC on your network. It stores your projects in the cloud which means that if all goes wrong you’ve got a backup. The instructions for installation can be found at:
That’s about it, after a couple of hours my Raspberry Pi is back up and running and my GPIO projects are all working. I will write about the projects in the next post.