Modifications

Sauter à la navigation Sauter à la recherche
1 583 octets ajoutés ,  29 août 2017 à 19:41
Page créée avec « {{Rasp-Hat-Moteur-NAV}} {{traduction}} == Installation de la partie logicielle == We have a Python library you can use to control DC and stepper motors, its probably the... »
{{Rasp-Hat-Moteur-NAV}}

{{traduction}}
== Installation de la partie logicielle ==
We have a Python library you can use to control DC and stepper motors, its probably the easiest way to get started, and python has support for multithreading which can be really handy when running multiple stepper motors at onces!

== Activer I2C ==
[[Rasp-Hack-GPIO_Configurer_I2C|You will have to make I2C support work on your Pi before you begin, visit our tutorial to enable I2C in the kernel!]]

Before you start, you'll need to have the python smbus library installed as well as 'git', run '''apt-get install python-smbus git'''

== Télécharger le code depuis GitHub ==
The easiest way to get the code onto your Pi is to hook up an Ethernet cable or with a WiFi setup, and clone it directly using 'git', which is installed by default on most distros.

Simply run the following commands from an appropriate location (ex. "/home/pi"):

<nowiki>git clone https://github.com/adafruit/Adafruit-Motor-HAT-Python-Library.git
cd Adafruit-Motor-HAT-Python-Library</nowiki>

Install python-dev if you havent already:

<nowiki>sudo apt-get install python-dev</nowiki>

Now install it with the setup install command:

<nowiki>sudo python setup.py install</nowiki>

{{ADFImage|Rasp-Hat-Moteur-Logiciel-00.png|480px}}

That's it! Now you can get started with testing. Run:

<nowiki>cd examples</nowiki>

from within the Motor HAT library folder, we have a couple examples to demonstrate the different types of motors and configurations. The next few pages will explain them

{{Rasp-Hat-Moteur-TRAILER}}
29 973

modifications

Menu de navigation