Modifications

Sauter à la navigation Sauter à la recherche
2 807 octets ajoutés ,  19 février 2017 à 21:13
Ligne 71 : Ligne 71 :  
That's all you need to do to install libftdi.  Let's move on to install the Adafruit Python GPIO library next.
 
That's all you need to do to install libftdi.  Let's move on to install the Adafruit Python GPIO library next.
   −
== Bibliothèque Adafruit Pyhton GPIO ==
+
== Bibliothèque Adafruit Python GPIO ==
 
Finally let's install the Adafruit Python GPIO library which will allow your Python scripts to access the MPSSE functionality of the FT232H breakout
 
Finally let's install the Adafruit Python GPIO library which will allow your Python scripts to access the MPSSE functionality of the FT232H breakout
   Ligne 81 : Ligne 81 :     
  <nowiki>python setup.py install</nowiki>
 
  <nowiki>python setup.py install</nowiki>
 +
 +
Note if you see an error that Python can't be found then make sure you installed Python 2.7 as mentioned at the top of the page, and that it was added to your system path. [http://stackoverflow.com/questions/6318156/adding-python-path-on-windows-7 Here's more details on how to manually add Python to your system path].
 +
 +
You should see the Python library install itself with text similar to the below:
 +
 +
{{ADFImage|RASP-FT232H-MPSSE-Windows-30.png}}
 +
 +
Now let's test if both the libftdi and Adafruit Python GPIO libraries were correctly installed.  In the command terminal run Python by executing:
 +
 +
<nowiki>python</nowiki>
 +
 +
Once the Python interpretor has loaded, type the following at the >>> prompt:
 +
 +
<syntaxhighlight lang="python">
 +
import Adafruit_GPIO
 +
import ftdi1
 +
</syntaxhighlight>
 +
 +
You should see no response from the Python interpretor after entering each command like below:
 +
 +
{{ADFImage|RASP-FT232H-MPSSE-Windows-31.png}}
 +
 +
No response from the Python interpretor is a good sign because it means Python was able to successfully load the libraries.
 +
 +
If you see an error message or failure after entering a command, unfortunately something went wrong with the installation of the library.  Go back through the steps above and carefully check that nothing was missed.  You want to make sure all the libftdi files are copied into the Python site-packages folder, and that the Adafruit Python GPIO library installed itself successfully.
 +
 +
Once you've confirmed Python can load the libraries, exit the Python interpretor by typing:
 +
 +
<nowiki>quit()</nowiki>
 +
 +
Congratulations, the MPSSE mode drivers and Python libraries are installed and ready to use!  Move on to the next section to see how to use the MPSSE mode to access GPIO, SPI, I2C, etc.
 +
 +
== Désinstallation de libusb ==
 +
Should you ever want to disable the MPSSE mode for the FT232H and return to its serial UART mode follow the steps below.
 +
 +
First make sure the FT232H breakout is plugged in to the computer.  Then open Device Manager and find the '''libusbK USB Devices''' node and the '''USB Serial Converter''' child of that node.  Right click the device and select Uninstall as shown below:
 +
 +
{{ADFImage|RASP-FT232H-MPSSE-Windows-40.png}}
 +
 +
In the dialog that appears make sure the 'Delete the driver software for this device.' option is checked as shown below:
 +
 +
{{ADFImage|RASP-FT232H-MPSSE-Windows-41.png}}
 +
 +
Click '''OK''' and the libusb driver should be completely uninstalled for the device.
 +
 +
Now unplug the FT232H breakout board and go back to the [https://learn.adafruit.com/adafruit-ft232h-breakout/serial-uart#windows-serial-driver-installation Serial UART page] to find the instructions for installing the Windows serial driver.  Follow those instructions again and you should be set with the device acting as a USB serial UART again.
 +
    
{{RASP-FT232H-TRAILER}}
 
{{RASP-FT232H-TRAILER}}
29 922

modifications

Menu de navigation