Error message

  • Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in include_once() (line 1389 of /Library/Server/Web/Data/Sites/Documents/jonathansblog/includes/
  • Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in require_once() (line 341 of /Library/Server/Web/Data/Sites/Documents/jonathansblog/includes/

Warning message

The service having id "facebook_widget" is missing, reactivate its module or save again the list of services.


Raspberry Pi and PiFace

My PiFace arrived last week and this was the first time I've had a proper play using it with the Raspberry Pi.

I needed to do some things first to get it working, and I thought I'd document it here for future reference. Your Raspberry Pi will need to be connected to the Internet for this install.


1. Firstly, the Raspberry Pi interfaces with the PiFace through SPI, so this will need enabling.

sudo pico etc/modprobe.d/raspi-blacklist.conf

Insert a # at the beginning of the line

 blacklist spi-bcm2708

like so
 #blacklist spi-bcm2708
2. Second, install the PiFace Digital libraries and change the permissions of the SPI interface. Luckily, running this command will automate the entire process.

sudo apt-get update

wget -O - | bash

And reboot your Pi once installed.

sudo reboot


Use the PiFace emulator to test the input and outputs for the PiFace board.

You'll need to log back into your Raspberry Pi and start the GUI environment (startx)

Open the Terminal application and type:


This will enable you to test the inputs are recognised and the outputs software controllable.


I was itching to begin controlling the PiFace board from within Python. I wrote a simple program to demonstrate it working.

import piface.pfio as piface
switch7 = piface.digital_read(7)
print switch7
if switch7 > 0:

This code simply switches output one on if switch7 is closed.

Subscribe to RSS - PiFace