We will need to download the library to work with the motor board we have chosen. Many robot parts, apart from the simplest ones, have an interface library to control the motors and other devices on the board. It's time to log in to your Pi, using PuTTY again.
Writing code to test your motors
Preparing libraries
We will download this code from a project on GitHub using Git, but featuring the Raspberry Pi. So, first, we will need to put Git on the Pi; we are also going to need I2C (i2c-tools and python-smbus) and pip so we can install things into Python. Type the following command:
pi@myrobot:~ $ sudo apt-get install -y git python-pip python-smbus i2c-tools
It will now install these tools for you.
Now, to get the library...