Datasheet

Installing Software
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!
Enable I2C
You will have to make I2C support work on your Pi before you begin, visit our tutorial to
enable I2C in the kernel! (http://adafru.it/dEO)
Before you start, you'll need to have the python smbus library installed as well as 'git', run
apt-get install python-smbus git
Downloading the Code from 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
© Adafruit Industries
https://learn.adafruit.com/adafruit-dc-and-stepper-motor-hat-for-
raspberry-pi
Page 20 of 38