Skip to main content

Add your description here

Project description

PyMDrive

PyMDrive is a python driver for MDrive motors. It has wrappers for standard commands (home, move absolute, move relative, etc.) and any other MCode command can be added easily.

Installation

It is easiest to install with pip: pip install pymdrive

You can also install with uv by cloning the repo and using uv sync.

Usage

To get started do

from pymdrive import MdriveAxis, MdriveComm

COMM = MdriveComm("COM3")
await COMM.start()

X = MdriveAxis(comm=COMM, name="X")
Y = MdriveAxis(comm=COMM, name="Y")

This initializes the COMM and starts its asynchronous queue for processing commands without race conditions. The COMM is then passed to Axis instances where the names are those specified on the motors memory.

From there, you can send standard commands

await X.move_relative(1000)

await Y.move_absolute(0)

There's a testing.ipynb notebook in the tests directory with these and other commands.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymdrive-0.1.0.tar.gz (10.3 MB view details)

Uploaded Source

Built Distribution

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

pymdrive-0.1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file pymdrive-0.1.0.tar.gz.

File metadata

  • Download URL: pymdrive-0.1.0.tar.gz
  • Upload date:
  • Size: 10.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for pymdrive-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d08a9ecd7ea9057a4859645c18a2d0303efc65e98beeb5474808a4433a2f373a
MD5 68a734eb70945a160117c2169e9b66b5
BLAKE2b-256 a11e249436282b63b133a192a4bfdecbb98a978ed1c400c37ff48df34c06a8f2

See more details on using hashes here.

File details

Details for the file pymdrive-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pymdrive-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for pymdrive-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91c28d0919d5a684a6541cbdb954015c327e29e4af2d66c423e60146c4606e50
MD5 1f147c2ed3d5cbf4d6a6ad3d2ce344d2
BLAKE2b-256 1f325d50266b2a2d3147977520594edfc14a814e4ee2c451ed3e4312ad44eff0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page