To install the Python library:
These instructions assume you're using Linux bash, although the library can also be installed in other environments for testing.
pip install l293d
l293d is installable via PyPI, using the above command.
However, this might not be always the very latest (development) version.
If you're happy using the version on the Python Package Index,
pip install l293d command and skip to instruction 5.
To install the latest version, follow the below instructions.
Remember to prefix the pip install command with
sudo if you wish to install this package globally.
1. Clone code from GitHub
$ git clone https://github.com/jamesevickery/l293d.git
2. Navigate to the l293d folder
$ cd l293d/
3. Install dependencies
$ sudo apt-get install python-dev python-pip
$ sudo apt-get install python3-pip
Install RPi.GPIO (Pi only):
$ sudo pip install RPi.GPIO
Also installable via
pip (as above) is recommended:
$ sudo apt-get install RPi.GPIO
RPi.GPIO is required to drive motors on the Raspberry Pi, although in other environments, test mode is automatically enabled if
RPi.GPIO isn't found.
4. Install the library
$ sudo python setup.py install
Or for use with Python 3, swap
python3 in the command above.
$ python >>> import l293d
python3 may be used instead of
python, although remember that installations for different Python versions are independent.
Once l293d has been successfully installed, it can be used to drive motors. See Python Scripts for more info.
l293d can be installed in a virtualenv, like you can with other packages:
pip install virtualenv
2. Create virtualenv
3. Activate virtualenv
4. Install l293d
Once you've finished using the virtualenv:
To learn more about virtualenv, I found this site useful.