Rasp-Hat-Moteur-Logiciel

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Installation de la partie logicielle

Adafruit propose une bibliothèque Python permettant de contrôler les moteurs continus et moteurs pas-à-pas. Il s'agit là de la façon la plus facile de débuter et comme Python supporte le multithreading, il est très facile de faire fonctionner plusieurs moteurs pas-à-pas en même temps!

Activer 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"):

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

Install python-dev if you havent already:

sudo apt-get install python-dev

Now install it with the setup install command:

sudo python setup.py install

Rasp-Hat-Moteur-Logiciel-00.png
Crédit: AdaFruit Industries www.adafruit.com

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

cd examples

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


Source: Adafruit DC and Stepper Motor HAT for Raspberry Pi
Créé par LadyAda pour AdaFruit Industries.

Traduction réalisée par Meurisse D pour MCHobby.be.

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.

Traduit avec l'autorisation d'AdaFruit Industries - Translated with the permission from Adafruit Industries - www.adafruit.com