1. Introduction

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 for distribution
*		This README
*		Set PYTHONPATH for testing
*		Setup script to install/distribute
* src			Sources of this library

3. Prerequisites

  • 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 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”:

export PYTHONPATH=~/python/usherpa

5. Examples

Some examples are located under “example-src/”. On the command line, you could run them after you installed the library like this:

python example-src/[ExampleToRun]

If you prefer running the examples from the project directory (without installing the library), you could do the following:

python example-src/

Note: the serial port to use is hard-coded in the examples. Thus, double check if this matches you port.

Leave a Reply

You must be logged in to post a comment.