Skip to content

Latest commit

 

History

History
127 lines (83 loc) · 3.88 KB

README.rst

File metadata and controls

127 lines (83 loc) · 3.88 KB

pyHerkuleX logo Mirror

Release 1.1.0 License: GPL v3 pipeline status

pyHerkuleX is a Python package for communicating with smart HerkuleX servo motors manufactured by Hyulim Robot company.

To obtain permission to use this code for commercial purposes, contact Guenhael LE QUILLIEC (mailto:[email protected]).

Contribute

Github is a mirror of the official pyHerkuleX repository. This is a publish-only repository and all pull requests are ignored. Please visit the official repository on Framagit to report issues or contribute fixes (no registration needed, you can also sign in with your GitHub account).

Documentation

An HTML version of the documentation is available online at:

online documentation https://guenhael.frama.io/pyherkulex/

Requirements

  • Python 2.7 or higher, including Python 3.4 and higher
  • pySerial 2.6 or higher

Download and installation

Download a copy of the latest public release (current version: 1.1.0):

download project archive pyherkulex-master.zip

Unzip and run python setup.py build install from the source directory to install pyherkulex library on your machine. Or simply copy-past pyherkulex folder in the working directory of your project.

Simple usage example

This simple example blinks LED in blue, in 1 second interval, of all HerkuleX servos connected to default serial port with default baudrate 115200.

#!/usr/bin/env python

"""
Blinks LED in blue of all connected HerkuleX servos.
"""

import pyherkulex as hx
import time

broadcast_srv = hx.Servo()
broadcast_srv.reboot()

while True:
    broadcast_srv.led = hx.LED_BLUE
    time.sleep(1)
    broadcast_srv.led = hx.LED_OFF
    time.sleep(1)

Tip

  • Before running this test, make sure each servos has its own ID, different from any other connected servo to avoid any communication error, or simply run this test with only one single servo connected to the serial bus.
  • Also make sure no servo has a specific baudrate value different than the default (factory) value 115200.
  • Finally, check servo status in case of LED blinking red (alarm).