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.
Download the latest release from the releases section (or clone the repository) and extract it to wherever you want it.
This driver requires Python 3,
the hidapi library and
the Python3 hidapi wrapper library (https://github.com/apmorton/pyhidapi)
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.
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.
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.
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.
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.
On linux you'll need to run the scripts as root, otherwise it cannot connect to the pendant on use the serial port.
This project is licensed under the MIT license. To view the full license text, see the LICENSE file.