The article describes, how to install the uSherpa Python client API by using the command-line on Linux. For more information on how to use the API see this article.
2. Project Directory Layout
* example-src Examples * LICENSE License information * MANIFEST.in Manifest for distribution * README.md This README * setenv.sh Set PYTHONPATH for testing * setup.py Setup script to install/distribute * src Sources of this library
- To use the library, the pyserial has to be installed.
- A MCU (currently the TI Launchpad with MSP430G2553) with uSherpa firmware flashed.
- For details about how to flash the firmware, see the uSherpa firmware documentation.
4. Install the Library
To install the library issue the following command in the top-level project directory:
python setup.py install
Alternatively you could place the “usherpa” folder from “src” to a directory of your choice and make your PYTHONDIR point to it. E.g. if you copied “usherpa-pysherpa/src” to “~/python/usherpa”:
Some examples are located under “example-src/”. On the command line, you could run them after you installed the library like this:
If you prefer running the examples from the project directory (without installing the library), you could do the following:
. setup.sh python example-src/
Note: the serial port to use is hard-coded in the examples. Thus, double check if this matches you port.