Skip to content

Versatile Python "driver" for XHC CNC pendants

License

Notifications You must be signed in to change notification settings

simaoamorim/xhc_receiver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xhc_receiver

This is a python "driver" to use XHC CNC pendants with serial port controlled CNC machines.

This driver interprets the pendant inputs onto predefined actions and sends configurable commands over the serial port.

Notice: This driver only supports the XHC WHB04B-6/HB04B-6 pendant for now. The WHB04B-4/HB04B-4 pendant should work with this driver because it has the same base functionality, but it's untested.

Installation

Download the latest release from the releases section (or clone the repository) and extract it to wherever you want it.

Dependencies

This driver requires Python 3, the hidapi library and the Python3 hidapi wrapper library (https://github.com/apmorton/pyhidapi)

UPDATE

For better integration, a modified version of the refered Python hidapi wrapper has been included in the sources, so there's no need to install it as a dependency anymore.

Installing the HIDAPI library

Linux

On linux search your distribution repos for hidapi or libhidapi and install it.

You may find variations like libhidapi-hidraw and libhidapi-libusb, which are wrappers arround different usb libraries. If you choose the libusb backend, you'll also need to install it.

Windows

On Windows, the easiest way is to download the pre-compiled binaries from the releases section and copy the hidapi.dll files from the x64 and x86 directories to C:\Windows\SysWOW64 and C:\Windows\System32, respectively.

OSX

There are no current binary distributions of hidapi for OSX, so you'll have to see the hidapi's README file for instructions on how to build from source.

Usage

This driver is still in alpha development, so this information may become inaccurate with further development

To run this driver simply start the main.py and actions.py script.

Using Linux

On linux you'll need to run the scripts as root, otherwise it cannot connect to the pendant on use the serial port.

License

This project is licensed under the MIT license. To view the full license text, see the LICENSE file.

About

Versatile Python "driver" for XHC CNC pendants

Resources

License

Stars

Watchers

Forks

Packages

No packages published