pykinisi


Namepykinisi JSON
Version 1.0.4 PyPI version JSON
download
home_pagehttps://github.com/szolotykh/pykinisi
SummaryPython package for Kinisi Controller
upload_time2024-02-26 04:55:19
maintainer
docs_urlNone
authorSergey Zolotykh
requires_python
licenseMIT
keywords motor controller hardware robotics kinisi kinisi controller
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://raw.githubusercontent.com/szolotykh/kinisi-motor-controller-firmware/command-script/commands.md)

## Installation
Install pykinisi with pip:
```bash
pip install pykinisi
```

## Controlling Single Motor
This example shows how to connect to the motor controller and control a single motor.\
```python
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:
```bash
cd examples
python <example_file> <serial_port>
```

## Package Development
Install pykinisi for development:
```bash
pip install -e .
```

Update KinisiCommands.py file:
```bash
cd tools
pip install -r requirements.txt
python update-commands.py --branch=main
```

## Links
- [Kinisi Motion Controller firmware](https://github.com/szolotykh/kinisi-motor-controller-firmware)
- [Kinisi Motion Controller hardware](https://github.com/szolotykh/kinisi-motor-controller-board)
- [JavaScipt package for kinisi motor controller](https://github.com/szolotykh/jskinisi)
- [Python package for kinisi motor controller](https://github.com/szolotykh/pykinisi)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/szolotykh/pykinisi",
    "name": "pykinisi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "motor controller,hardware,robotics,kinisi,kinisi controller",
    "author": "Sergey Zolotykh",
    "author_email": "szolotykh88@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/1e/5a/54e9ea84c613e1b90240daa7425699d1c6f341c2b1a21f062e3e5a86cf7b/pykinisi-1.0.4.tar.gz",
    "platform": null,
    "description": "# pykinisi\r\nPython package for kinisi motor controller. This package is used to control the kinisi motor controller via serial interface.\\\r\nDescription of the commands can be found in [Kinisi Motion Controller framework documentation](https://raw.githubusercontent.com/szolotykh/kinisi-motor-controller-firmware/command-script/commands.md)\r\n\r\n## Installation\r\nInstall pykinisi with pip:\r\n```bash\r\npip install pykinisi\r\n```\r\n\r\n## Controlling Single Motor\r\nThis example shows how to connect to the motor controller and control a single motor.\\\r\n```python\r\nimport time\r\nfrom pykinisi import *\r\n\r\nport = \"COM3\"\r\n\r\ncontroller = KinisiController()\r\nif not controller.connect(port):\r\n    print(f\"Can't open serial connection. Port: {port}\")\r\n    exit()\r\n\r\n# Motor test\r\nmotor_index = MotorIndex.Motor0\r\nspeed = 40 # Speed in percentage\r\n\r\n# Is motor reversed \r\nis_reversed = False\r\n \r\ncontroller.initialize_motor(motor_index, is_reversed)\r\n\r\n# Set motor speed to speed\r\ncontroller.set_motor_speed(motor_index, speed)\r\ntime.sleep(5)\r\n\r\n# Stop motor\r\ncontroller.stop_motor(motor_index)\r\n```\r\n\r\n## More Examples\r\nThere are several examples in the examples folder which show how to use the pykinisi package to control the kinisi motor controller.\\\r\nRun the examples with:\r\n```bash\r\ncd examples\r\npython <example_file> <serial_port>\r\n```\r\n\r\n## Package Development\r\nInstall pykinisi for development:\r\n```bash\r\npip install -e .\r\n```\r\n\r\nUpdate KinisiCommands.py file:\r\n```bash\r\ncd tools\r\npip install -r requirements.txt\r\npython update-commands.py --branch=main\r\n```\r\n\r\n## Links\r\n- [Kinisi Motion Controller firmware](https://github.com/szolotykh/kinisi-motor-controller-firmware)\r\n- [Kinisi Motion Controller hardware](https://github.com/szolotykh/kinisi-motor-controller-board)\r\n- [JavaScipt package for kinisi motor controller](https://github.com/szolotykh/jskinisi)\r\n- [Python package for kinisi motor controller](https://github.com/szolotykh/pykinisi)\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python package for Kinisi Controller",
    "version": "1.0.4",
    "project_urls": {
        "Homepage": "https://github.com/szolotykh/pykinisi"
    },
    "split_keywords": [
        "motor controller",
        "hardware",
        "robotics",
        "kinisi",
        "kinisi controller"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a430cb468fd247437d42543251cf1ce34613b65888ea313815f7f4e62a1478cd",
                "md5": "5108daee876f263dea294d6586616ca2",
                "sha256": "32b7bae5e28813876255c92198f89ff828237c057372ce453f17ce69adbc740f"
            },
            "downloads": -1,
            "filename": "pykinisi-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5108daee876f263dea294d6586616ca2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7235,
            "upload_time": "2024-02-26T04:55:18",
            "upload_time_iso_8601": "2024-02-26T04:55:18.238005Z",
            "url": "https://files.pythonhosted.org/packages/a4/30/cb468fd247437d42543251cf1ce34613b65888ea313815f7f4e62a1478cd/pykinisi-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1e5a54e9ea84c613e1b90240daa7425699d1c6f341c2b1a21f062e3e5a86cf7b",
                "md5": "e5c9ed28f261774f9d0c30ab1d8745c5",
                "sha256": "5a9a9322c844d7095cb72d2aabe475bbe1f221e4b96f9f7988b8b4cf89ade876"
            },
            "downloads": -1,
            "filename": "pykinisi-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "e5c9ed28f261774f9d0c30ab1d8745c5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7515,
            "upload_time": "2024-02-26T04:55:19",
            "upload_time_iso_8601": "2024-02-26T04:55:19.920654Z",
            "url": "https://files.pythonhosted.org/packages/1e/5a/54e9ea84c613e1b90240daa7425699d1c6f341c2b1a21f062e3e5a86cf7b/pykinisi-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-26 04:55:19",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "szolotykh",
    "github_project": "pykinisi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "pykinisi"
}
        
Elapsed time: 2.65840s