one-axis-stage 0.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- one_axis_stage-0.0.2/.gitignore +139 -0
- one_axis_stage-0.0.2/CITATION.cff +20 -0
- one_axis_stage-0.0.2/LICENSE +29 -0
- one_axis_stage-0.0.2/PKG-INFO +140 -0
- one_axis_stage-0.0.2/README.md +87 -0
- one_axis_stage-0.0.2/VERSION +1 -0
- one_axis_stage-0.0.2/pyproject.toml +125 -0
- one_axis_stage-0.0.2/src/one_axis_stage/__init__.py +20 -0
- one_axis_stage-0.0.2/src/one_axis_stage/api.py +197 -0
- one_axis_stage-0.0.2/src/one_axis_stage/axis.py +123 -0
- one_axis_stage-0.0.2/src/one_axis_stage/connection.py +165 -0
- one_axis_stage-0.0.2/src/one_axis_stage/controller.py +181 -0
- one_axis_stage-0.0.2/src/one_axis_stage/interface.py +94 -0
- one_axis_stage-0.0.2/src/one_axis_stage/py.typed +0 -0
- one_axis_stage-0.0.2/tests/api_scan_devices.py +47 -0
- one_axis_stage-0.0.2/tests/data/data.placeholder.txt +0 -0
- one_axis_stage-0.0.2/tests/example_config.yaml +41 -0
- one_axis_stage-0.0.2/tests/example_config.yaml_saved.yaml +38 -0
- one_axis_stage-0.0.2/tests/example_controller.py +66 -0
- one_axis_stage-0.0.2/tests/example_interface.py +94 -0
- one_axis_stage-0.0.2/tests/tests/test_integration/test_placeholder.py +28 -0
- one_axis_stage-0.0.2/tests/tests/test_unit/test_unit.py +11 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# IDE files
|
|
2
|
+
.idea/
|
|
3
|
+
.vscode/
|
|
4
|
+
|
|
5
|
+
# Ignored file types
|
|
6
|
+
.DS_Store
|
|
7
|
+
|
|
8
|
+
# Custom config files
|
|
9
|
+
*.conf.custom
|
|
10
|
+
|
|
11
|
+
# Byte-compiled / optimized / DLL files
|
|
12
|
+
__pycache__/
|
|
13
|
+
*.py[cod]
|
|
14
|
+
*$py.class
|
|
15
|
+
|
|
16
|
+
# C extensions
|
|
17
|
+
*.so
|
|
18
|
+
|
|
19
|
+
# Distribution / packaging
|
|
20
|
+
.Python
|
|
21
|
+
build/
|
|
22
|
+
develop-eggs/
|
|
23
|
+
dist/
|
|
24
|
+
downloads/
|
|
25
|
+
eggs/
|
|
26
|
+
.eggs/
|
|
27
|
+
lib/
|
|
28
|
+
lib64/
|
|
29
|
+
parts/
|
|
30
|
+
sdist/
|
|
31
|
+
var/
|
|
32
|
+
wheels/
|
|
33
|
+
pip-wheel-metadata/
|
|
34
|
+
share/python-wheels/
|
|
35
|
+
*.egg-info/
|
|
36
|
+
.installed.cfg
|
|
37
|
+
*.egg
|
|
38
|
+
MANIFEST
|
|
39
|
+
|
|
40
|
+
# PyInstaller
|
|
41
|
+
# Usually these files are written by a python script from a template
|
|
42
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
43
|
+
*.manifest
|
|
44
|
+
*.spec
|
|
45
|
+
|
|
46
|
+
# Installer logs
|
|
47
|
+
pip-log.txt
|
|
48
|
+
pip-delete-this-directory.txt
|
|
49
|
+
|
|
50
|
+
# Unit test / coverage reports
|
|
51
|
+
htmlcov/
|
|
52
|
+
.tox/
|
|
53
|
+
.nox/
|
|
54
|
+
.coverage
|
|
55
|
+
.coverage.*
|
|
56
|
+
.cache
|
|
57
|
+
nosetests.xml
|
|
58
|
+
coverage.xml
|
|
59
|
+
*.cover
|
|
60
|
+
*.py,cover
|
|
61
|
+
.hypothesis/
|
|
62
|
+
.pytest_cache/
|
|
63
|
+
|
|
64
|
+
# Translations
|
|
65
|
+
*.mo
|
|
66
|
+
*.pot
|
|
67
|
+
|
|
68
|
+
# Django stuff:
|
|
69
|
+
*.log
|
|
70
|
+
local_settings.py
|
|
71
|
+
db.sqlite3
|
|
72
|
+
db.sqlite3-journal
|
|
73
|
+
|
|
74
|
+
# Flask stuff:
|
|
75
|
+
instance/
|
|
76
|
+
.webassets-cache
|
|
77
|
+
|
|
78
|
+
# Scrapy stuff:
|
|
79
|
+
.scrapy
|
|
80
|
+
|
|
81
|
+
# Sphinx documentation
|
|
82
|
+
docs/_build/
|
|
83
|
+
|
|
84
|
+
# PyBuilder
|
|
85
|
+
target/
|
|
86
|
+
|
|
87
|
+
# Jupyter Notebook
|
|
88
|
+
.ipynb_checkpoints
|
|
89
|
+
|
|
90
|
+
# IPython
|
|
91
|
+
profile_default/
|
|
92
|
+
ipython_config.py
|
|
93
|
+
|
|
94
|
+
# pyenv
|
|
95
|
+
.python-version
|
|
96
|
+
|
|
97
|
+
# pipenv
|
|
98
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
99
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
100
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
101
|
+
# install all needed dependencies.
|
|
102
|
+
#Pipfile.lock
|
|
103
|
+
|
|
104
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
105
|
+
__pypackages__/
|
|
106
|
+
|
|
107
|
+
# Celery stuff
|
|
108
|
+
celerybeat-schedule
|
|
109
|
+
celerybeat.pid
|
|
110
|
+
|
|
111
|
+
# SageMath parsed files
|
|
112
|
+
*.sage.py
|
|
113
|
+
|
|
114
|
+
# Environments
|
|
115
|
+
.env
|
|
116
|
+
.venv
|
|
117
|
+
env/
|
|
118
|
+
venv/
|
|
119
|
+
ENV/
|
|
120
|
+
env.bak/
|
|
121
|
+
venv.bak/
|
|
122
|
+
|
|
123
|
+
# Spyder project settings
|
|
124
|
+
.spyderproject
|
|
125
|
+
.spyproject
|
|
126
|
+
|
|
127
|
+
# Rope project settings
|
|
128
|
+
.ropeproject
|
|
129
|
+
|
|
130
|
+
# mkdocs documentation
|
|
131
|
+
/site
|
|
132
|
+
|
|
133
|
+
# mypy
|
|
134
|
+
.mypy_cache/
|
|
135
|
+
.dmypy.json
|
|
136
|
+
dmypy.json
|
|
137
|
+
|
|
138
|
+
# Pyre type checker
|
|
139
|
+
.pyre/
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
type: software
|
|
4
|
+
title: "one-axis-stage: Hardware design and software for modular, low-cost one-axis stages"
|
|
5
|
+
version: "0.0.1"
|
|
6
|
+
repository-code: https://github.com/murineshiftwork/one-axis-stage
|
|
7
|
+
license-url: https://github.com/murineshiftwork/one-axis-stage/blob/main/LICENSE
|
|
8
|
+
authors:
|
|
9
|
+
- family-names: Rollik
|
|
10
|
+
given-names: Lars B.
|
|
11
|
+
orcid: https://orcid.org/0000-0003-0160-6971
|
|
12
|
+
|
|
13
|
+
# Zenodo integration (optional):
|
|
14
|
+
# 1. Enable the Zenodo webhook at zenodo.org/account/settings/github
|
|
15
|
+
# 2. After first tag release, copy the concept DOI from Zenodo and add:
|
|
16
|
+
#
|
|
17
|
+
# identifiers:
|
|
18
|
+
# - type: doi
|
|
19
|
+
# value: 10.5281/zenodo.XXXXXXX
|
|
20
|
+
# description: Zenodo concept DOI (resolves to latest version)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021-present, Lars B. Rollik
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: one-axis-stage
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: Hardware design and software for modular, low-cost one-axis stages
|
|
5
|
+
Project-URL: Homepage, https://github.com/murineshiftwork/one-axis-stage
|
|
6
|
+
Project-URL: Documentation, https://murineshiftwork.github.io/one-axis-stage/
|
|
7
|
+
Project-URL: Issue Tracker, https://github.com/murineshiftwork/one-axis-stage/issues
|
|
8
|
+
Author-email: "Lars B. Rollik" <lars@rollik.me>
|
|
9
|
+
License: BSD 3-Clause License
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2021-present, Lars B. Rollik
|
|
12
|
+
All rights reserved.
|
|
13
|
+
|
|
14
|
+
Redistribution and use in source and binary forms, with or without
|
|
15
|
+
modification, are permitted provided that the following conditions are met:
|
|
16
|
+
|
|
17
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
18
|
+
list of conditions and the following disclaimer.
|
|
19
|
+
|
|
20
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
21
|
+
this list of conditions and the following disclaimer in the documentation
|
|
22
|
+
and/or other materials provided with the distribution.
|
|
23
|
+
|
|
24
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
25
|
+
contributors may be used to endorse or promote products derived from
|
|
26
|
+
this software without specific prior written permission.
|
|
27
|
+
|
|
28
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
29
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
30
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
31
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
32
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
33
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
34
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
35
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
36
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
37
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
38
|
+
License-File: LICENSE
|
|
39
|
+
Requires-Python: >=3.10
|
|
40
|
+
Requires-Dist: pyserial
|
|
41
|
+
Requires-Dist: pyyaml
|
|
42
|
+
Provides-Extra: dev
|
|
43
|
+
Requires-Dist: commitizen; extra == 'dev'
|
|
44
|
+
Requires-Dist: mypy; extra == 'dev'
|
|
45
|
+
Requires-Dist: pre-commit; extra == 'dev'
|
|
46
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
47
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
48
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
49
|
+
Requires-Dist: types-pyyaml; extra == 'dev'
|
|
50
|
+
Provides-Extra: docs
|
|
51
|
+
Requires-Dist: mkdocs-material; extra == 'docs'
|
|
52
|
+
Description-Content-Type: text/markdown
|
|
53
|
+
|
|
54
|
+
[//]: # (Links)
|
|
55
|
+
[Github-flavored markdown]: https://github.github.com/gfm
|
|
56
|
+
|
|
57
|
+
[manifest]: https://packaging.python.org/en/latest/guides/using-manifest-in
|
|
58
|
+
[packaging]: https://packaging.python.org/en/latest/tutorials/packaging-projects
|
|
59
|
+
[setup.cfg]: https://setuptools.pypa.io/en/latest/userguide/declarative_config.html
|
|
60
|
+
|
|
61
|
+
[bump2version]: (https://github.com/c4urself/bump2version
|
|
62
|
+
[pre-commit]: https://pre-commit.com
|
|
63
|
+
|
|
64
|
+
[//]: # ([black]: https://github.com/psf/black)
|
|
65
|
+
[ruff]: https://docs.astral.sh/ruff
|
|
66
|
+
[mypy]: https://mypy.readthedocs.io
|
|
67
|
+
|
|
68
|
+
[pypi]: pypi.org
|
|
69
|
+
[test.pypi]: test.pypi.org
|
|
70
|
+
|
|
71
|
+
[Zenodo]: https://zenodo.org
|
|
72
|
+
|
|
73
|
+
[contribution guidelines]: https://github.com/larsrollik/one-axis-stage/blob/main/CONTRIBUTING.md
|
|
74
|
+
[issues]: https://github.com/larsrollik/one-axis-stage/issues
|
|
75
|
+
[BSD 3-Clause License]: https://github.com/larsrollik/one-axis-stage/blob/main/LICENSE
|
|
76
|
+
[Github]: https://github.com/larsrollik/one-axis-stage/settings/secrets/actions/new
|
|
77
|
+
[release]: https://github.com/larsrollik/one-axis-stage/releases/new
|
|
78
|
+
|
|
79
|
+
[//]: # (Badges)
|
|
80
|
+
|
|
81
|
+
[](https://github.com/larsrollik/one-axis-stage/blob/main/CONTRIBUTING.md)
|
|
82
|
+

|
|
83
|
+
[](https://github.com/pre-commit/pre-commit)
|
|
84
|
+
[](https://github.com/larsrollik/one-axis-stage)
|
|
85
|
+
|
|
86
|
+
[//]: # ([](https://pypi.org/project/one-axis-stage))
|
|
87
|
+
[//]: # ([](https://pypi.org/project/one-axis-stage))
|
|
88
|
+
|
|
89
|
+
# one-axis-stage
|
|
90
|
+
Hardware design and software for modular, low-cost one-axis stages
|
|
91
|
+
---
|
|
92
|
+
**Version: "0.0.1"**
|
|
93
|
+
|
|
94
|
+
```-> TODO: add image```
|
|
95
|
+
|
|
96
|
+
## Hardware build
|
|
97
|
+
|
|
98
|
+
### Parts list
|
|
99
|
+
|
|
100
|
+
##### Commercially available parts
|
|
101
|
+
|
|
102
|
+
| Part name | Product code | Amount (#) | Cost per part (GBP) | Total cost (GBP) | |
|
|
103
|
+
|-------------------------------|-----------------------|------------|---------------------|------------------|------------------------------------------------------------------------------------------------------|
|
|
104
|
+
| Arduino Mega 2560 | | 1 | 20 | | https://docs.arduino.cc/hardware/mega-2560 |
|
|
105
|
+
| Dynamixel Arduino shield | | 1 | 20 | | https://emanual.robotis.com/docs/en/parts/interface/dynamixel_shield/ |
|
|
106
|
+
| Dynamixel XL-320 motor | XL-320 | 1+ | 20 | | https://emanual.robotis.com/docs/en/dxl/x/xl320/ |
|
|
107
|
+
| USB to TTL adapter | LN-101 or MIKROE-3063 | 1 | 14 / 13 | | https://emanual.robotis.com/docs/en/parts/interface/ln-101 / https://www.mikroe.com/usb-uart-3-click |
|
|
108
|
+
| USB-B to other USB (computer) | | 1 | | | |
|
|
109
|
+
| Linear slide 26mm range | BSP1035SL | 2+ | 26 | | https://uk.rs-online.com/web/p/linear-slides/0749301 |
|
|
110
|
+
| | | | | | |
|
|
111
|
+
|
|
112
|
+
##### 3D-printed parts
|
|
113
|
+
|
|
114
|
+
| Part | Count |
|
|
115
|
+
|------|-------|
|
|
116
|
+
| | |
|
|
117
|
+
| | |
|
|
118
|
+
| | |
|
|
119
|
+
|
|
120
|
+
### Assembly instructions
|
|
121
|
+
|
|
122
|
+
```-> TODO: add info on how to assemble the hardware```
|
|
123
|
+
|
|
124
|
+
## Software controller
|
|
125
|
+
|
|
126
|
+
### Example usage
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
from one_axis_stage import StageController
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## Contributing
|
|
135
|
+
Contributions are very welcome!
|
|
136
|
+
Please see the [contribution guidelines] or check out the [issues]
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
## License
|
|
140
|
+
This software is released under the **[BSD 3-Clause License]**
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
[//]: # (Links)
|
|
2
|
+
[Github-flavored markdown]: https://github.github.com/gfm
|
|
3
|
+
|
|
4
|
+
[manifest]: https://packaging.python.org/en/latest/guides/using-manifest-in
|
|
5
|
+
[packaging]: https://packaging.python.org/en/latest/tutorials/packaging-projects
|
|
6
|
+
[setup.cfg]: https://setuptools.pypa.io/en/latest/userguide/declarative_config.html
|
|
7
|
+
|
|
8
|
+
[bump2version]: (https://github.com/c4urself/bump2version
|
|
9
|
+
[pre-commit]: https://pre-commit.com
|
|
10
|
+
|
|
11
|
+
[//]: # ([black]: https://github.com/psf/black)
|
|
12
|
+
[ruff]: https://docs.astral.sh/ruff
|
|
13
|
+
[mypy]: https://mypy.readthedocs.io
|
|
14
|
+
|
|
15
|
+
[pypi]: pypi.org
|
|
16
|
+
[test.pypi]: test.pypi.org
|
|
17
|
+
|
|
18
|
+
[Zenodo]: https://zenodo.org
|
|
19
|
+
|
|
20
|
+
[contribution guidelines]: https://github.com/larsrollik/one-axis-stage/blob/main/CONTRIBUTING.md
|
|
21
|
+
[issues]: https://github.com/larsrollik/one-axis-stage/issues
|
|
22
|
+
[BSD 3-Clause License]: https://github.com/larsrollik/one-axis-stage/blob/main/LICENSE
|
|
23
|
+
[Github]: https://github.com/larsrollik/one-axis-stage/settings/secrets/actions/new
|
|
24
|
+
[release]: https://github.com/larsrollik/one-axis-stage/releases/new
|
|
25
|
+
|
|
26
|
+
[//]: # (Badges)
|
|
27
|
+
|
|
28
|
+
[](https://github.com/larsrollik/one-axis-stage/blob/main/CONTRIBUTING.md)
|
|
29
|
+

|
|
30
|
+
[](https://github.com/pre-commit/pre-commit)
|
|
31
|
+
[](https://github.com/larsrollik/one-axis-stage)
|
|
32
|
+
|
|
33
|
+
[//]: # ([](https://pypi.org/project/one-axis-stage))
|
|
34
|
+
[//]: # ([](https://pypi.org/project/one-axis-stage))
|
|
35
|
+
|
|
36
|
+
# one-axis-stage
|
|
37
|
+
Hardware design and software for modular, low-cost one-axis stages
|
|
38
|
+
---
|
|
39
|
+
**Version: "0.0.1"**
|
|
40
|
+
|
|
41
|
+
```-> TODO: add image```
|
|
42
|
+
|
|
43
|
+
## Hardware build
|
|
44
|
+
|
|
45
|
+
### Parts list
|
|
46
|
+
|
|
47
|
+
##### Commercially available parts
|
|
48
|
+
|
|
49
|
+
| Part name | Product code | Amount (#) | Cost per part (GBP) | Total cost (GBP) | |
|
|
50
|
+
|-------------------------------|-----------------------|------------|---------------------|------------------|------------------------------------------------------------------------------------------------------|
|
|
51
|
+
| Arduino Mega 2560 | | 1 | 20 | | https://docs.arduino.cc/hardware/mega-2560 |
|
|
52
|
+
| Dynamixel Arduino shield | | 1 | 20 | | https://emanual.robotis.com/docs/en/parts/interface/dynamixel_shield/ |
|
|
53
|
+
| Dynamixel XL-320 motor | XL-320 | 1+ | 20 | | https://emanual.robotis.com/docs/en/dxl/x/xl320/ |
|
|
54
|
+
| USB to TTL adapter | LN-101 or MIKROE-3063 | 1 | 14 / 13 | | https://emanual.robotis.com/docs/en/parts/interface/ln-101 / https://www.mikroe.com/usb-uart-3-click |
|
|
55
|
+
| USB-B to other USB (computer) | | 1 | | | |
|
|
56
|
+
| Linear slide 26mm range | BSP1035SL | 2+ | 26 | | https://uk.rs-online.com/web/p/linear-slides/0749301 |
|
|
57
|
+
| | | | | | |
|
|
58
|
+
|
|
59
|
+
##### 3D-printed parts
|
|
60
|
+
|
|
61
|
+
| Part | Count |
|
|
62
|
+
|------|-------|
|
|
63
|
+
| | |
|
|
64
|
+
| | |
|
|
65
|
+
| | |
|
|
66
|
+
|
|
67
|
+
### Assembly instructions
|
|
68
|
+
|
|
69
|
+
```-> TODO: add info on how to assemble the hardware```
|
|
70
|
+
|
|
71
|
+
## Software controller
|
|
72
|
+
|
|
73
|
+
### Example usage
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
from one_axis_stage import StageController
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
## Contributing
|
|
82
|
+
Contributions are very welcome!
|
|
83
|
+
Please see the [contribution guidelines] or check out the [issues]
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
This software is released under the **[BSD 3-Clause License]**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.0.2
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling", "hatch-vcs"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "one-axis-stage"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Hardware design and software for modular, low-cost one-axis stages"
|
|
9
|
+
readme = { file = "README.md", content-type = "text/markdown" }
|
|
10
|
+
license = { file = "LICENSE" }
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "Lars B. Rollik", email = "lars@rollik.me" },
|
|
13
|
+
]
|
|
14
|
+
requires-python = ">=3.10"
|
|
15
|
+
dependencies = [
|
|
16
|
+
"pyserial",
|
|
17
|
+
"pyyaml",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.urls]
|
|
21
|
+
Homepage = "https://github.com/murineshiftwork/one-axis-stage"
|
|
22
|
+
Documentation = "https://murineshiftwork.github.io/one-axis-stage/"
|
|
23
|
+
"Issue Tracker" = "https://github.com/murineshiftwork/one-axis-stage/issues"
|
|
24
|
+
|
|
25
|
+
[project.optional-dependencies]
|
|
26
|
+
dev = [
|
|
27
|
+
"commitizen",
|
|
28
|
+
"pytest",
|
|
29
|
+
"pytest-cov",
|
|
30
|
+
"pre-commit",
|
|
31
|
+
"ruff",
|
|
32
|
+
"mypy",
|
|
33
|
+
"types-PyYAML",
|
|
34
|
+
]
|
|
35
|
+
docs = [
|
|
36
|
+
"mkdocs-material",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
# ---------------------------------------------------------------------------
|
|
40
|
+
# Build
|
|
41
|
+
# ---------------------------------------------------------------------------
|
|
42
|
+
|
|
43
|
+
[tool.hatch.version]
|
|
44
|
+
source = "vcs"
|
|
45
|
+
fallback-version = "0.0.1"
|
|
46
|
+
|
|
47
|
+
[tool.hatch.build.targets.wheel]
|
|
48
|
+
packages = ["src/one_axis_stage"]
|
|
49
|
+
|
|
50
|
+
[tool.hatch.build.targets.sdist]
|
|
51
|
+
include = [
|
|
52
|
+
"/src/one_axis_stage",
|
|
53
|
+
"/tests",
|
|
54
|
+
"/README.md",
|
|
55
|
+
"/LICENSE",
|
|
56
|
+
"/pyproject.toml",
|
|
57
|
+
"/CITATION.cff",
|
|
58
|
+
"/VERSION",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
# ---------------------------------------------------------------------------
|
|
62
|
+
# Commitizen
|
|
63
|
+
# ---------------------------------------------------------------------------
|
|
64
|
+
|
|
65
|
+
[tool.commitizen]
|
|
66
|
+
name = "cz_conventional_commits"
|
|
67
|
+
version_provider = "commitizen"
|
|
68
|
+
version = "0.0.2"
|
|
69
|
+
tag_format = "v$version"
|
|
70
|
+
update_changelog_on_bump = false
|
|
71
|
+
version_files = ["VERSION"]
|
|
72
|
+
|
|
73
|
+
# ---------------------------------------------------------------------------
|
|
74
|
+
# Pytest
|
|
75
|
+
# ---------------------------------------------------------------------------
|
|
76
|
+
|
|
77
|
+
[tool.pytest.ini_options]
|
|
78
|
+
testpaths = ["tests/tests/test_unit"]
|
|
79
|
+
addopts = "--cov=one_axis_stage --durations=0"
|
|
80
|
+
|
|
81
|
+
# ---------------------------------------------------------------------------
|
|
82
|
+
# Ruff
|
|
83
|
+
# ---------------------------------------------------------------------------
|
|
84
|
+
|
|
85
|
+
[tool.ruff]
|
|
86
|
+
line-length = 88
|
|
87
|
+
indent-width = 4
|
|
88
|
+
exclude = ["tests"]
|
|
89
|
+
|
|
90
|
+
[tool.ruff.lint]
|
|
91
|
+
select = ["E", "W", "F", "I", "UP", "YTT", "SIM", "PTH", "TCH", "PYI"]
|
|
92
|
+
fixable = ["ALL"]
|
|
93
|
+
ignore = ["E501"]
|
|
94
|
+
|
|
95
|
+
[tool.ruff.format]
|
|
96
|
+
quote-style = "double"
|
|
97
|
+
indent-style = "space"
|
|
98
|
+
skip-magic-trailing-comma = false
|
|
99
|
+
line-ending = "auto"
|
|
100
|
+
|
|
101
|
+
# ---------------------------------------------------------------------------
|
|
102
|
+
# Mypy
|
|
103
|
+
# ---------------------------------------------------------------------------
|
|
104
|
+
|
|
105
|
+
[tool.mypy]
|
|
106
|
+
mypy_path = "src"
|
|
107
|
+
namespace_packages = true
|
|
108
|
+
explicit_package_bases = true
|
|
109
|
+
ignore_missing_imports = true
|
|
110
|
+
exclude = ["tests"]
|
|
111
|
+
|
|
112
|
+
[[tool.mypy.overrides]]
|
|
113
|
+
module = ["one_axis_stage.connection", "one_axis_stage.api"]
|
|
114
|
+
ignore_errors = true
|
|
115
|
+
|
|
116
|
+
# ---------------------------------------------------------------------------
|
|
117
|
+
# uv
|
|
118
|
+
# ---------------------------------------------------------------------------
|
|
119
|
+
|
|
120
|
+
[tool.uv]
|
|
121
|
+
environments = [
|
|
122
|
+
"sys_platform == 'linux'",
|
|
123
|
+
"sys_platform == 'darwin'",
|
|
124
|
+
"sys_platform == 'win32'",
|
|
125
|
+
]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
__author__ = "Lars B. Rollik"
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
__version__ = version("one-axis-stage")
|
|
7
|
+
except PackageNotFoundError:
|
|
8
|
+
__version__ = "0.0.1"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
OP_MODE_LOOKUP_TO_STR = {
|
|
12
|
+
0: "OP_POSITION",
|
|
13
|
+
1: "OP_EXTENDED_POSITION",
|
|
14
|
+
2: "OP_CURRENT_BASED_POSITION",
|
|
15
|
+
3: "OP_VELOCITY",
|
|
16
|
+
4: "OP_PWM",
|
|
17
|
+
5: "OP_CURRENT",
|
|
18
|
+
}
|
|
19
|
+
OP_MODE_LOOKUP = {v: k for k, v in OP_MODE_LOOKUP_TO_STR.items()}
|
|
20
|
+
BAUDRATE_LOOKUP = {0: 9600, 1: 57600, 2: 115200, 3: 1000000}
|