
The instructions from the official WiringPi homepage are now depreciated. Note: Wiring Pi is now pre-installed with standard Raspbian systems. If you would like alternative ways to set up your Pi, please refer to the following tutorials:
Follow the official installation instructions. As of this writing, it's at version 2.8.2. If you've already got a working Raspbian system, skip ahead to the next section. If you're starting from scratch, with a blank SD card, you'll want to install Raspbian. If you're working with an older install, it might be worth backing up your SD card, and starting with a fresh install. With the implementation of device tree overlays in Raspbian, some of the specific interface enablement details have changed. Many different operating systems have been ported to the Pi, and the device driver infrastructure has also changed quite a bit.įor this tutorial, we'll be using a recent version of Raspbian (installed via NOOBS), and the wiringPi I/O library for C/C++ (or spidev/smbus for Python). The software landscape for the Raspberry Pi has evolved considerably since the introduction of the Pi. SPI on the Pi allows for up to two attached devices, while I2C potentially allows for many devices, as long as their addresses don't conflict.
The other two serial interfaces are the Serial Peripheral Interface ( SPI) and Inter-Integrated-Circuit bus ( I2C). You're probably already familiar with the UART serial port, which allows you to open a login session from a serial terminal application, such as PuTTY. The Raspberry Pi has three types of serial interface on the GPIO header.