Hardware Reference
In-Depth Information
Git and Source Code Management
Git is a source code management (SCM) system that keeps track of different versions of
files. SCMs are necessary when multiple people work on the same project. Imagine if two
people were working on a project and changed the same file at the same time. Without
SCM the first 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 (including
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 proficient 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.
Type lsmod again and you should see spi_bcm2708 listed. Programs send a message over
the SPI bus by writing characters to a special file. Type ls -la /dev/spi* to check whether
the special file exists. If you're successful, Linux will show at least one file. If you receive a
message such as No such file or directory , you need to check that the SPI driver
module is functioning correctly.
Installing Python Modules
With the spi_bcm2708 module loaded, Linux can talk SPI to peripherals. The next step is to
install programs that will make the driver easier to use and send the correct messages over
the SPI bus:
Make sure that the Raspberry Pi is up to date. Because the Raspberry Pi will check the
Internet for updates, you need to make sure that your Raspberry Pi is online. Then
type sudo apt-get update .
Wait until Linux downloads and updates files, which can typically take a couple of
minutes.
 
Search WWH ::




Custom Search