Pokeys
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 19300
- Thank you received: 6462
I wonder.......what about the actual keys? Or you have a stash of nice ideas that you can turn to!
Keep up the good work.
Tom
Please Log in or Create an account to join the conversation.
I need a simple 'how to' covering getting PoKeys to work with LinuxCNC and then how to identify signals from the PoKeys. Sorry if I'm being stupid, but previous posts in this thread don't help me at all (they assume more knowledge of Linux than I have - I'm used to Windows where you just run an installer, then use it).
Can anyone get me started ?
Please Log in or Create an account to join the conversation.
-Use commands from my first post to compile hal component.
-use "loadusr" in HAL to load a component
-use "setp pokeys.0.devSerial" to set serial number of your board
check first post for updated code from today.
Please Log in or Create an account to join the conversation.
When use say 'use' - am I supposed to put that command in a file ? (which one, which directory?).
What is the 'component' that I'm supposed to load?
What do I do with the code from first post?
I'm sure it's obvious once you know, but I'm clearly missing some basic knowledge. This reminds me why I've abandoned Linux several times before - great applications, very tricky to get started from zero base.
Please Log in or Create an account to join the conversation.
basically you need to do:
1. install libusb
2. download and compile pokeys library
3. compile my HAL component
4. set "udev" rules for your usb device
after that, you can include pokeys component in your HAL file as IO device.
read that:
linuxcnc.org/lucid/docs/2.6/html/hal/basic_hal.html
linuxcnc.org/docs/html/hal/comp.html
Please Log in or Create an account to join the conversation.
The line "sudo halcompile ./pokeys.comp"
Does the file name that I copy your driver code into have to be named to match part of that command ? Is there a preferred location to place your code in, or doesn't it matter?
The multi-line command commencing gcc - does that have to be run from a particular directory ?
Not sure I understand 'set "udev" rules' yet.
Please Log in or Create an account to join the conversation.
The line "sudo halcompile ./pokeys.comp"
Does the file name that I copy your driver code into have to be named to match part of that command ?
Yes, the file should be called "pokeys.comp". .comp is a file format that is converted into standard C-code by the LinuxCNC utility "halcompile". Normally halcmompile can also compile and install the .comp file directly, but it seems that this component needs some special compiler options to make it work.
The "./" means "in this directory" so you need to run the halcompile command from the same directory that you saved the pokeys.comp file into.
The multi-line command is the step that compiles the HAL component into an executable. It needs to be run from the same directory as the .c file created by the first stage ended up in.there a preferred location to place your code in, or doesn't it matter?
The multi-line command commencing gcc - does that have to be run from a particular directory ?
This is the step that gives the new component permission to handle the USB device.Not sure I understand 'set "udev" rules' yet.
Please Log in or Create an account to join the conversation.
I will add some additional information in first topic, so it will be more clear for begginers.
Finally I got it!
I needed to create a new udev rule:
Create a new file in the /etc/udev/rules.d named 90-usb-pokeys.rules with the following contents:
SUBSYSTEM=="usb", ATTRS{idVendor}=="1dc3", ATTRS{idProduct}=="1001", GROUP="plugdev", MODE="664"
Save the file, then execute
udevadm control --reload-rules
That's it!
Please Log in or Create an account to join the conversation.