Hardware Reference
In-Depth Information
Install the necessary packages by typing sudo apt-get install python-dev
python-gtk2-dev git .
Linux will list any other programs necessary and tell you how much additional disk
space is required. Confirm that you want to continue by typing Y and pressing enter.
After a few minutes the programs will be installed.
Get the latest software to control PiFace by typing the following, after typing cd to
return to your home directory:
git clone https://github.com/thomasmacpherson/piface.git
This will copy the latest PiFace code and examples into your home directory. Type ls
piface to list the contents of the directory that have just been downloaded.
So that all users of the Raspberry Pi can use the SPI bus, you need to change the per-
missions on the /dev/spi * files. PiFace Digital provides a handy script to set SPI
permissions. Run the script by typing
sudo piface/scripts/spidev-setup
Restart by typing
sudo reboot
Lastly, you need to install the Python modules that will make it easy to send the cor-
rect messages on the SPI bus.
Type cd to get back to the home directory.
Change the directory to the piface directory and then the python directory by typing
cd piface/python .
Install the Python module that talks to PiFace Digital by typing sudo python
setup.py install . After a few minutes the necessary files will be installed and you
will be ready to start testing with real hardware.
Finally, shut down the Pi and remove the power before connecting the PiFace interface
by typing sudo halt .
It is useful to know how to install software manually, but if in the future you want to
install PiFace Digital with one command, instructions are provided at http://www.piface.
org.uk .
TIP
 
Search WWH ::




Custom Search