Tested on:Raspberry Pi 2; Raspberry Pi B+; Raspbian pre Jessie
Prerequisites:Raspberry Pi with Raspbian Jessie and internet connection (see steps 1-7 in the Introduction)

Raspberry Pi: Installation of the Serial Peripheral Interface Bus SPI

The Serial Peripheral Interface Bus is a synchronous(timed) bus which can act like an shift register and therefore multiply the input or output channels of the Raspberry Pi’s GPIO. Additionally, SPI allows very fast data transfer!

To install the SPI module for python, type in the terminal

In raspi-config, goto Advanced Options, then to A6 SPI and confirm. Confirm when asked to load SPI at bootup, too, and reboot afterwards.

After the reboot, start python with sudo python and try to import the spidev library:

Python 3
For installing spidev for Python 3, just replace the line


in this tutorial.

Knight of Pi

Johannes Bergs aka Knight of Pi. Diploma in Bioinformatics, some Webdesign and Python coding then. Living in the beautiful city of Vienna.


Time limit is exhausted. Please reload CAPTCHA.