Usage
Here's a basic example of how to use the servomotor package:
TODO
For more detailed usage instructions, please refer to the documentation.
Choosing the serial port
The command line tools work out which serial port to use in this order, highest priority first:
-p PORTon the command line (-Pinstead pops up a menu of detected ports)- the
SERVOMOTOR_PORTenvironment variable - the port saved from the last successful run
- an interactive menu, if none of the above apply
So a port can be set once for a whole shell session:
export SERVOMOTOR_PORT=/dev/ttyUSB0 # Linux
export SERVOMOTOR_PORT=/dev/cu.usbserial-110 # macOS
set SERVOMOTOR_PORT=COM3 # Windows (cmd)
$env:SERVOMOTOR_PORT = "COM3" # Windows (PowerShell)
-p still overrides it for a single command, and -P always shows the menu.
After a port is opened successfully it is remembered, in a per-user location:
| Platform | Saved port file |
|---|---|
| Linux | $XDG_CONFIG_HOME/servomotor/serial_device.txt, else ~/.config/servomotor/serial_device.txt |
| macOS | ~/Library/Application Support/servomotor/serial_device.txt |
| Windows | %LOCALAPPDATA%\servomotor\serial_device.txt |
Delete that file to forget the remembered port.
Serial port permissions on Linux
Serial devices usually belong to the dialout group (uucp on some
distributions). If you get a permission error, add yourself to it:
sudo usermod -a -G dialout $USER
then log out and back in for the change to take effect.
Features
- Control Gearotons servomotors via serial communication
- Easy-to-use interface for sending commands and receiving responses
- Automatic handling of serial port selection and management
Requirements
- Python 3.6+
- pyserial 3.5+
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact
Tom Rodinger - tom.rodinger@alumni.utoronto.ca
Project Link: https://gearotons.com
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file servomotor-0.12.2.tar.gz.
File metadata
- Download URL: servomotor-0.12.2.tar.gz
- Upload date:
- Size: 157.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
853967291ab79169c69530190edd54344ce3e0294ed587e1875b2d56841a22c3
|
|
| MD5 |
ef23cf78656deb69d66a057fd4d1e1ee
|
|
| BLAKE2b-256 |
20371c261d53f019a8861d7a81d9c495bd597d96551ea7a30a986973cd2ccbe5
|
Provenance
The following attestation bundles were made for servomotor-0.12.2.tar.gz:
Publisher:
publish-python.yml on tomrodinger/servomotor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
servomotor-0.12.2.tar.gz -
Subject digest:
853967291ab79169c69530190edd54344ce3e0294ed587e1875b2d56841a22c3 - Sigstore transparency entry: 2287266132
- Sigstore integration time:
-
Permalink:
tomrodinger/servomotor@867fbd4eee3b3bdfef91eb27d5755c2aa731283b -
Branch / Tag:
refs/tags/pylib-v0.12.2 - Owner: https://github.com/tomrodinger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@867fbd4eee3b3bdfef91eb27d5755c2aa731283b -
Trigger Event:
push
-
Statement type:
File details
Details for the file servomotor-0.12.2-py3-none-any.whl.
File metadata
- Download URL: servomotor-0.12.2-py3-none-any.whl
- Upload date:
- Size: 183.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a071f6f7276a63a9dd60bd30d7eb905c440da0ad1a043124cd478873ae27db02
|
|
| MD5 |
a9c4ee7b00e7772db36fb144b7727137
|
|
| BLAKE2b-256 |
10a82f2c9917e09779710267eda6c8407605c312877eb29936a41445ea02f085
|
Provenance
The following attestation bundles were made for servomotor-0.12.2-py3-none-any.whl:
Publisher:
publish-python.yml on tomrodinger/servomotor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
servomotor-0.12.2-py3-none-any.whl -
Subject digest:
a071f6f7276a63a9dd60bd30d7eb905c440da0ad1a043124cd478873ae27db02 - Sigstore transparency entry: 2287266155
- Sigstore integration time:
-
Permalink:
tomrodinger/servomotor@867fbd4eee3b3bdfef91eb27d5755c2aa731283b -
Branch / Tag:
refs/tags/pylib-v0.12.2 - Owner: https://github.com/tomrodinger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@867fbd4eee3b3bdfef91eb27d5755c2aa731283b -
Trigger Event:
push
-
Statement type: