Hardware Reference
In-Depth Information
Momentary arcade pushbutton switch (http://na.suzohapp.com/all_catalogs/pushbuttons/58-9111-L)
We will make use of the PiFace interf ace board available at http://www.piface.org.uk/
products/piface_digital/ to interface these butons to Raspberry Pi. The board is
a stackable add-on hardware that can be used to interface eight inputs and eight outputs.
The PiFace comes with four tacile switches and we can get started with tesing the inputs.
The main reason behind using the PiFace is that we need to monitor the switch states to
determine there is a key press. The PiFace comes with an I/O expansion opion and can be
accessed through the SPI interface. These features enable simple control of the game inputs.
Prepare for lift off
1. Raspberry Pi's Serial Peripheral Interface (SPI) drivers need to enabled by ediing
the /etc/modprobe.d/raspi-blacklist.conf file using a text editor such
as nano :
sudo nano /etc/modprobe.d/raspi-blacklist.conf
The drivers can be enabled by inserting an # before the following line:
#blacklist spi-bcm2708
The SPI drivers need to be loaded using the modprobe command:
sudo modprobe spi-bcm2708
The drivers/tools required to interface with the PiFace module can be
installed as follows:
wget http://pi.cs.man.ac. uk/download/old_install.txt
 
Search WWH ::




Custom Search