Installation of Raspberry Pi and PiFace Relay+

Setup / Installation of a Raspberry Pi incl. PiFace

Sometimes it is not so easy to get a PiFace Relay+ Module. If they are available, I order 2 – 5. The background is, if a Raspberry or relay do not work properly, you can setup a new one! Or you have an idea that could not wait, then you can start in a few minutes!

Das unboxing and the assembly…

The assembling is not difficult. Just put the pin board on the Raspberry Pi and the put the PiFace Module carefully on it. Put the little transparent plastic distance piece between Raspi and Piface.

Installation of wiringpi

Now you have to activate the module. Plug the cables in and start the Pi. The easiest way to switch the relay is to use wiring. BUT, the current version does not work without modifications. Thats why I decided to downgrade wiringpi. In the example I use version 2.31. It is possible to use any other version before 2.44+1. You can find the versions in the archive and download the *.deb file. .

sudo mkdir wiringPi
cd wiringPi
sudo dpkg -i wiringpi_2.31_armhf.deb
dpkg: warning: downgrading wiringpi from 2.46 to 2.31
(Reading database ... 133215 files and directories currently installed.)
Preparing to unpack wiringpi_2.31_armhf.deb ...
Unpacking wiringpi (2.31) over (2.46) ...
Setting up wiringpi (2.31) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for man-db ( ...

gpio -v
gpio version: 2.31
Copyright (c) 2012-2015 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty

Unable to determine hardware version. I see: Hardware	: BCM2835
 - expecting BCM2708 or BCM2709.
If this is a genuine Raspberry Pi then please report this
to If this is not a Raspberry Pi then you are on your own as wiringPi is designed to support the
Raspberry Pi ONLY.

The error message has no impact on the function! With version 2.44 you will receive no error message.

Now it is time to activate SPI in the Respi-config:

sudo raspi-config

Navigate to “5 Interfacing Options Configure connections to peripherals”, then select “P4 SPI Enable/Disable automatic loading of SPI kernel module” and then “Ok” and  “Finish”

Now you can use the commands:

gpio -p write 200 1
gpio -p write 200 0

After the first command you should hear a click and see a red LED at the PiFace. With the 2. command you reverse it.

That is it! Now you can start with scripting. Enjoy your new gadget!



Leave a Reply

Your email address will not be published. Required fields are marked *