Tested on:Raspberry Pi B+; Python 2.7; Raspbian pre Jessie
Prerequisites:Raspberry Pi with Raspbian Jessie(see steps 1-5 in the Introduction)
Raspberry Pi: Installation of the Serial Peripheral Interface Bus SPI
Hardware:PiFace Digital

Face the reality: Install PiFace Digital

PiFace Digital is a interface board for the Raspberry Pi 1 B. It allows to control relays, LEDs, buttons and some more. For using PiFace Digital on a Raspberry Pi 2 or B+, a 26 Pin Gpio Connector Header Extender is necessary.

The two black blocks are relays which can(inofficially) trigger up to 250V devices.

A PiFace Digital stacked onto a Raspberry Pi B

After installing the Serial Peripheral Interface Bus SPI, shutdown the Raspberry Pi, stack PiFace digital onto it and boot.

Install PiFace Digital, its emulator and the scratch handler
Enter in the terminal

Usage example – Whack a mole

Try the sample code on Github, check out the documentation or this great introduction from raspberryconnect.com.

Raspberry Pi 2
As of march 2015, the whack-a-mole didn’t work as intended on the Raspberry Pi 2!

PiFace Digital Website: http://www.piface.org.uk/products/piface_digital/
Header Extender on ModMyPi: https://www.modmypi.com/26-pin-gpio-connector-header-extender
PiFace Digital sample code: https://github.com/piface/pifacedigitalio
PiFace Digital docs: https://piface.github.io/pifacedigitalio/example.html
Raspberryconnect.com introduction: http://www.raspberryconnect.com/hardware-add-ons/item/156-piface-digital

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.