Hardware Reference
In-Depth Information
3. Type cd to return to your home directory and then get the latest software to control
PiFace by typing the following:
git clone https://github.com/thomasmacpherson/piface.git
his 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.
Git and Source Code Management
Git is a source code management (SCM) system that keeps track of different versions of
iles. SCMs are necessary when multiple people work on the same project. Imagine if two
people were working on a project and changed the same ile at the same time. Without
SCM the irst person's changes might get overwritten by the second. SCMs instead help
manage the process and can merge both contributions. They also keep previous versions
(like wikis do) so it's possible to go back.
Git was initially developed by Linus Torvalds for collaborative development of the Linux
operating system but then used by many other projects. There are other SCMs such as
SVN, CVS and Mercurial, which provide similar functions.
GitHub ( http://github.com ) is a website that hosts projects using Git. It's designed for
social coding, so everyone can suggest changes and contribute to improving a project. As
the Raspberry Pi has such a strong community, there are many projects on GitHub (includ-
ing the code for Linux itself) for the Raspberry Pi that everyone can contribute to.
GitHub offers free accounts and tutorials so as you become a more proicient coder, you
might as well try using source code management for your project. It can be really useful if
you start working with a friend or want to go back to a previous version of your code.
4. So that all users of the Raspberry Pi can use the SPI bus, you need to change the per-
missions on the /dev/spi * iles. PiFace Digital provides a handy script to set SPI per-
missions. Run the script by typing
sudo piface/scripts/spidev-setup
5. 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.
6. Log in again and type cd to get back to the home directory.
 
Search WWH ::




Custom Search