Modifications

Sauter à la navigation Sauter à la recherche
1 200 octets ajoutés ,  19 février 2017 à 21:30
Ligne 26 : Ligne 26 :     
Next download the Adafruit Python GPIO library by clicking the button below:
 
Next download the Adafruit Python GPIO library by clicking the button below:
 +
 +
{{download-box|Adafruit Python GPIO library|https://github.com/adafruit/Adafruit_Python_GPIO/archive/master.zip}}
 +
 +
Unzip the archive and navigate to the folder inside a terminal.  Then run the following command to install the library:
 +
 +
<nowiki>sudo python setup.py install</nowiki>
 +
 +
You should see the Python library successfully install without any errors. 
 +
 +
To test the libraries are installed run the following command in a terminal to open the Python interpretor:
 +
 +
<nowiki>python</nowiki>
 +
 +
At the Python interpretor >>> prompt type the following commands to test loading the libraries:
 +
 +
<syntaxhighlight lang="python">
 +
import Adafruit_GPIO
 +
import ftdi1
 +
</syntaxhighlight>
 +
 +
You should see no response from the Python interpretor after entering each line.  If you do see an error that a module cannot be loaded, go back to the libftdi installation steps above and carefully check they completed successfully.
 +
 +
If there are no errors, congratulations you've successfully installed libftdi and the Adafruit Python GPIO library!  Move on to the next section to learn how to access the MPSSE mode GPIO, SPI, I2C, etc.
 +
 +
To quit the Python interpretor enter the following:
 +
 +
<nowiki>quit()</nowiki>
       
{{RASP-FT232H-TRAILER}}
 
{{RASP-FT232H-TRAILER}}
29 917

modifications

Menu de navigation