Updated Install Instructions
This driver uses the PoKeys driver from
here
. It scans at about 15hz, fast enough for UI keys and knobs. I had problems with hidcomp, taking too much resources on my rather slow computer i use for my mill, so I wrote that. With this, i dont get any significant slow down on performance and key presses get detected 100%.
It needs device serial pin to be set in HAL file with proper value.
Set your IO pin function with standard windows software that comes with the board.
1) Install dependencies
Code:
sudo apt-get install git build-essential libusb-1.0-0 libusb-1.0-0-dev
2) Download the code to a git repository
Code:
git clone https://bitbucket.org/mbosnak/pokeyslib.git
3) Compile and install the driver
Code:
cd pokeyslib
sudo make -f Makefile.noqmake install
4) Create the LinuxCNC HAL driver, Download the pokeys.comp file attached to this post then compile and install with halcompile.
Code:
sudo halcompile --install pokeys.comp
5) To enable RW permission for USB device, you also need to set "udev" rules in linux:
Create a new file in the
named
Code:
90-usb-pokeys.rules
with the following contents:
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="1dc3", ATTRS{idProduct}=="1001", GROUP="plugdev", MODE="664"
Save the file, then execute
Code:
udevadm control --reload-rules
And that is it, now you can include the driver in your hal file with:
and after you set yours board serial with:
Code:
setp pokeys.0.devSerial 12345
pokeys.0.err should become False and pokeys.0.alive start blinking with approx 10hz.