Metadata-Version: 2.4
Name: one-axis-stage
Version: 0.2.1
Summary: Hardware design and software for modular, low-cost one-axis stages
Project-URL: Homepage, https://github.com/murineshiftwork/one-axis-stage
Project-URL: Documentation, https://murineshiftwork.github.io/one-axis-stage/
Project-URL: Issue Tracker, https://github.com/murineshiftwork/one-axis-stage/issues
Author-email: "Lars B. Rollik" <lars@rollik.me>
License: BSD 3-Clause License
        
        Copyright (c) 2021-present, Lars B. Rollik
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: pyserial
Requires-Dist: pyyaml
Provides-Extra: cli
Requires-Dist: readchar; extra == 'cli'
Provides-Extra: dev
Requires-Dist: commitizen; extra == 'dev'
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: readchar; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: types-pyyaml; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material; extra == 'docs'
Requires-Dist: mkdocstrings[python]; extra == 'docs'
Description-Content-Type: text/markdown

# one-axis-stage

[![PyPI](https://img.shields.io/pypi/v/one-axis-stage.svg)](https://pypi.org/project/one-axis-stage)

Hardware design and Python software for modular, low-cost one-axis stages using
Dynamixel XL-320 servo motors.

Provides a serial API, high-level controller, and `stage` CLI for
scanning, configuring, and jogging stages from the command line.

**[→ Full documentation](https://murineshiftwork.github.io/one-axis-stage)**

## Installation

```bash
pip install one-axis-stage
```

For interactive jog mode:

```bash
pip install "one-axis-stage[cli]"
```

## Quick start

```python
from one_axis_stage.api import StageAPI

api = StageAPI(serial_port="/dev/ttyUSB0")
api.connect()
print(api.get_info(device_id=21))
api.set_position(device_id=21, position=400)
api.disconnect()
```

## CLI

```bash
stage scan --port /dev/ttyUSB0
stage info --port /dev/ttyUSB0 --id 21
stage move --port /dev/ttyUSB0 --id 21 --position 400
stage jog  --port /dev/ttyUSB0 --id 21
```

## Hardware

Arduino Mega 2560 + Dynamixel shield + XL-320 motors + linear slides.
Firmware source in `firmware/`.

## License

BSD 3-Clause. See [LICENSE](LICENSE).
