Hardware Reference
In-Depth Information
It is possible to install PiFace Digital software on Raspbian as a Debian package with one
command. However, in the future you might need to install software that isn't packaged, or
perhaps want to use PiFace Digital on a different distribution that doesn't use Debian pack-
ages. As such the following steps show how to manually install software from the source.
Loading the SPI Driver Module
Check to see if the SPI driver is loaded. Type lsmod to list all modules. If it is loaded, you will
see the following line. Don't worry about the numbers on the right; it is the module name
spi_bcm2708 which is important.
spi_bcm2708 4401 0
If it is not listed, you need to enable the module. Although the driver module is included,
Linux “blacklists” some modules so they are not loaded. To un-blacklist the module, edit the
file /etc/modprobe.d/raspi-blacklist.conf. You can insert a # in front of the line blacklist
spi-bcm2708 to comment it out, or delete the line completely. Use your favourite editor to
edit the file, such as leafpad, nano or vi. For example, you use nano by typing the following:
sudo nano /etc/modprobe.d/raspi-blacklist.conf
Enter # at the start of the line blacklist spi-bcm2708 like so:
#blacklist spi-bcm2708
Save the file. If using the nano editor, press Ctrl + X and then confirm that you want to save
the file before exiting.
Commenting out is a way of making the computer ignore what is on that line. It works by
turning the line into a comment. Comments are text intended for the user and not interpreted
by the computer.
TIP
It is better to comment a line out rather than delete it as it makes it easier to restore later by
uncommenting (that is, removing the comment marker). Python also uses # for comments, so
you can temporarily remove a line of code by putting a # at the start of the line.
Restart the Raspberry Pi by typing sudo reboot .
 
Search WWH ::




Custom Search