TeCoEd (Teaching Computing Education)
  • Home
    • Freelance
    • Book
    • Downloading
  • Python
    • Learn Python >
      • Python Modules
    • PyGame Zero
    • Python Programs >
      • Higher or Lower
      • Magic Calculator
      • Password Checker
      • Python Pit
    • What's News App
    • Pixels to Cells
    • Python Mosaics
    • Python OCR
    • L-1-AM
    • Web Scraping >
      • Scraping Trains
    • Weather App
    • Snakes and Windows
    • Python Web Server >
      • Flask
    • Python Picks
  • Raspberry Pi
    • All About the Pi
    • Getting Started
    • Remote Desktop and VNC
    • Static IP Address
    • Sonic Pi >
      • 3.14
    • Twitter Feed >
      • Tweepy
    • Android & Pi >
      • Advanced Apps
      • Odds
    • A.I on the the Pi
    • CRON
    • Pick Your Own
  • Pi Hardware
    • Pi HATS >
      • Sense Hat Hacks
      • AstroPi HAT
      • Unicorn-HAT >
        • Unicorn Alphabet Disco
        • Uni Codes / Programs
      • Skywriter
      • Piano HAT
    • STS Pi
    • Pi Camera >
      • Pi-Cam, Python & Email >
        • Time Lapse
      • Pi Noir
    • Pipsta >
      • Flask, Input & Printers
    • Raspberry Pi Power >
      • Energenie IR power
    • Pibrella
    • Distance Sensor
    • LCD Screen
    • Pi-Tooth
    • Robot Arm
    • PiGlow
    • PiFM
    • Accelerometer
    • PiFace >
      • Installing PiFace >
        • Python Commands
  • Pi-Hacks
    • Drone Hacks
    • Pi Glue Gun Hack
    • Blinkt!
    • Sonic Pixels
    • R2D2
    • Get to the chopper
    • Astro Bird
    • Twitter Translator
    • Hacking a Robot
    • Nature_Box >
      • Best Nature Photos
    • Wearable Tech >
      • Project New York
      • P.N.Y Part 2 Health
      • P.N.Y Part 3 Games
      • P.N.Y Part 4 Translation
    • Dino-Tweet
    • Other Links
  • Pi-Hacks 2
    • The Joker
    • Hologram Machine
    • Google Vision: Camera Tell
    • Yoda Tweets
    • Pi Phone
    • Darth Beats
    • Twitter Keyword Finder
    • Crimbo Lights Hack
    • Xmas Elf
    • Halloween 2016
    • Halloween Hack 2015
    • Socrative Zombie
    • Voice Translation
    • The Blue-Who Finder
    • GPIO, Twitter
    • Pi Chat Bot >
      • Dictionary Definitions
    • PiGlow & Email
    • Pibrella Alarm System
    • SMS with Python >
      • Spooking a Mobile
  • Pi-Hacks 3
    • David Bowie
    • Lamp Prank >
      • TEST
    • Yoda FM
    • Retro Player
    • LED Pixel Art
    • TARDIS
    • Battleships
    • LED Board
    • Night Vision
    • Enviro+ Weather
  • Minecraft
    • Minecraft API
    • Minecraft Sweeper
    • PiGlove: Minecraft Power Up
    • Minecraft Photo-booth
    • Rendering Pixels
    • Speed Cube
    • Lucky Dip
  • Computing
    • Why Computing?
    • Can You Compute
    • micro:bit
    • Coding Resources
    • Learn to Code >
      • Coding with iPads
      • Apps Creation Tools
      • sKratchInn
      • Sound Editing
    • Cheat Sheets
    • Theory
    • HOUR OF CODING
    • BEBRAS Computing Challange
    • Computer Facts
    • Free Software and Links
  • Contact Me

Part 1: Getting Started


In the LX Terminal :

First update the Raspberry Pi software,  sudo apt-get update

The Serial Peripheral Interface Bus or SPI needs to be enabled to allow communication between the PiFace and the Raspberry Pi. To enable this,  
sudo nano /etc/modprobe.d/raspi-blacklist.conf

hash out the spi-bcm2708, it should read as below:

#blacklist spi-bcm2708

Save and exit the file, ensure the Pi is connected to the Internet and download the drivers for the PiFace.


wget http://pi.cs.man.ac.uk/download/install.txt

Then, to run the script in the terminal, type: bash install.txt

This may take up to 30 minutes

Then restart the Raspberry Pi, sudo reboot

Easy Option:

A pre-installed OS image is available at http://pi.cs.man.ac.uk/download/ 
Picture
Diagram from Brain Lewis

Part 2: Testing the PiFace 


The PiFace comes with  pre-installed Emulator so that you can test that all the inputs, relays etc are working correctly.

The PiFace consists of:
  • 2 changeover relays
  • 4 switches (Pushbuttons)
  • 8 digital inputs
  • 8 open-collector outputs
  • 8 LED indicators
  • Graphical emulator and simulator 

In the LX Terminal :

~/piface/scripts/piface-emulator
Emulator
Testing the Outputs

Select the Override Enabled, then select one of the Output Pins from the GUI. The corresponding LED on the PiFace will toggle on and off.  It is also possible to toggle ALL the LEDs using All On / Flip or All Off

Testing the Inputs

Select the Keep inputs updated, and the Inputs can be tested.  Press each of the buttons on the real PiFace and the switch will be toggled. 

Copyright 2021 TeCoEd @dan_aldred