Skip to main content

Python package for Kinisi Controller

Project description

pykinisi

Python package for kinisi motor controller. This package is used to control the kinisi motor controller via serial interface.
Description of the commands can be found in Kinisi Motion Controller framework documentation

Installation

Install pykinisi with pip:

pip install pykinisi

Controlling Single Motor

This example shows how to connect to the motor controller and control a single motor.\

import time
from pykinisi import *

port = "COM3"

controller = KinisiController()
if not controller.connect(port):
    print(f"Can't open serial connection. Port: {port}")
    exit()

# Motor test
motor_index = MotorIndex.Motor0
speed = 40 # Speed in percentage

# Is motor reversed 
is_reversed = False
 
controller.initialize_motor(motor_index, is_reversed)

# Set motor speed to speed
controller.set_motor_speed(motor_index, speed)
time.sleep(5)

# Stop motor
controller.stop_motor(motor_index)

More Examples

There are several examples in the examples folder which show how to use the pykinisi package to control the kinisi motor controller.
Run the examples with:

cd examples
python <example_file> <serial_port>

Package Development

Install pykinisi for development:

pip install -e .

Update KinisiCommands.py file:

cd tools
pip install -r requirements.txt
python update-commands.py --branch=main

Links

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

pykinisi-1.0.4.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

pykinisi-1.0.4.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file pykinisi-1.0.4.1.tar.gz.

File metadata

  • Download URL: pykinisi-1.0.4.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for pykinisi-1.0.4.1.tar.gz
Algorithm Hash digest
SHA256 57081c3e2d5e5b767d1f24f64b761711ae60c737e6d6397084f4ddd1a6e5738d
MD5 c6405371d1063338815b1040eceecce3
BLAKE2b-256 9ec118cfbb010c555af7cbd2aea4209aa1a71a11125d0f17953ee769de5ab1ea

See more details on using hashes here.

File details

Details for the file pykinisi-1.0.4.1-py3-none-any.whl.

File metadata

  • Download URL: pykinisi-1.0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for pykinisi-1.0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a319348421c7ba7b3f2a1628f98121a473b8e8d22cb0d611a514259f461b80d0
MD5 30c39ab337824f5cd430df858625f262
BLAKE2b-256 c41c507527f7f9d5bdc330a640390cd7f71218c846d725993d1f99836113f055

See more details on using hashes here.

Supported by

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