Skip to main content

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:

  1. -p PORT on the command line (-P instead pops up a menu of detected ports)
  2. the SERVOMOTOR_PORT environment variable
  3. the port saved from the last successful run
  4. 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

servomotor-0.12.2.tar.gz (157.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

servomotor-0.12.2-py3-none-any.whl (183.0 kB view details)

Uploaded Python 3

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

Hashes for servomotor-0.12.2.tar.gz
Algorithm Hash digest
SHA256 853967291ab79169c69530190edd54344ce3e0294ed587e1875b2d56841a22c3
MD5 ef23cf78656deb69d66a057fd4d1e1ee
BLAKE2b-256 20371c261d53f019a8861d7a81d9c495bd597d96551ea7a30a986973cd2ccbe5

See more details on using hashes here.

Provenance

The following attestation bundles were made for servomotor-0.12.2.tar.gz:

Publisher: publish-python.yml on tomrodinger/servomotor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for servomotor-0.12.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a071f6f7276a63a9dd60bd30d7eb905c440da0ad1a043124cd478873ae27db02
MD5 a9c4ee7b00e7772db36fb144b7727137
BLAKE2b-256 10a82f2c9917e09779710267eda6c8407605c312877eb29936a41445ea02f085

See more details on using hashes here.

Provenance

The following attestation bundles were made for servomotor-0.12.2-py3-none-any.whl:

Publisher: publish-python.yml on tomrodinger/servomotor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.12.2 This release

2 files

0.12.1

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page