Modifications

Sauter à la navigation Sauter à la recherche
1 958 octets ajoutés ,  14 janvier 2013 à 12:08
aucun résumé de modification
Ligne 1 : Ligne 1 :  
{{Rasp-Hack-GPIO-NAV}}
 
{{Rasp-Hack-GPIO-NAV}}
 +
 +
To make life easy for those wishing to experiment with attaching electronics to their Pi, Adafruit have produced an extensive and extremely useful collection of code. This includes simple Python libraries for a large number of modules, including displays, sensors and PWM controllers etc.
 +
 +
To fetch this code, you need to use some software called 'git'. This comes pre-installed on Occidentalis, but on Raspbian you must install it by entering the following commands into LX Terminal. 
 +
 +
You will find the icon for LX Terminal on your desktop.
 +
 +
[[Fichier:Rasp-Hack-GPIO-AdfPiCode1.png]]
 +
 +
Before we go any further, issue the following command in LXTerminal. This will ensure you package can be found and that you get the latest version. It does not matter which directory you are in.
 +
Copy Code
 +
 +
<nowiki>sudo apt-get update</nowiki>
 +
 +
[[Fichier:Rasp-Hack-GPIO-AdfPiCode2.png]]
 +
 +
The update may take a while, especially if this is the first time you have run it on your Pi. Eventually it should give you another command prompt '$' and it will be ready for you to type the next command which is:
 +
 +
<nowiki>sudo apt-get install git</nowiki>
 +
 +
Once git is installed (if its not already there) make yourself a suitable directory to contain all the Python code that you are going to install. Now 'cd' into that directory and then issue the following commands in LX Terminal.
 +
 +
<nowiki>git clone https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code.git
 +
cd Adafruit-Raspberry-Pi-Python-Code
 +
ls</nowiki>
 +
 +
 +
 +
If there is any problem during any of the steps above, you will see an error message. The most common reasons why something should fail to install are:
 +
* a problem with your Internet connections
 +
* a mis-typed command. Remember everything in Linux is case sensitive. It is best to open this page on your Raspberry Pi so you can just copy and paste the commands.
 +
 +
You will find all sorts of goodies in here, many of which we will use in later tutorials.
       
{{Rasp-Hack-GPIO-TRAILER}}
 
{{Rasp-Hack-GPIO-TRAILER}}
29 917

modifications

Menu de navigation