$10 Bluetooth Pendant
- xz81
- Offline
- New Member
-
Less
More
- Posts: 1
- Thank you received: 0
23 Sep 2015 15:07 #62880
by xz81
$10 Bluetooth Pendant was created by xz81
Hi, i just added a pendant to my machine using a Snakebyte idroid:con bluetooth gamepad I had over there. This gamepad can be configured to use it in keyboard mode, so the steps I have followed so far are:
1. Install bluetooth packets (may be I am not using some of them, but I am not a linux guru, so I just instaled them)2. Map the gamepad using xev (up, down, left and right cross are the same as the keyboard and I used L1 and L2 for Z axis ("q" and "x" keys)
3. In linuxcnc 2.7.0 there is no .axisrc file by defect (at least not in my fresh install), so I opened gedit and made this file:
4. open a terminal window and look for your gamepad
5. pair the bluetooth gamepad wiht some like:
So far it works, but I have to connect it by hand every time (not so bad). In the future I will use the other buttons to connect the spindle and to change the travel speed.
1. Install bluetooth packets (may be I am not using some of them, but I am not a linux guru, so I just instaled them)
sudo apt-get update
sudo apt-get install bluez bluez-utils bluez-comp bluez-hcidump
3. In linuxcnc 2.7.0 there is no .axisrc file by defect (at least not in my fresh install), so I opened gedit and made this file:
#swap bind key
# Bind ( and ) to jog axis 3 (0=X, 1=Y, 2=Z, 3=A, 4=B, ...)
root_window.bind("<Up>", lambda e: jog_on(1, +get_jog_speed(1)))
root_window.bind("<Down>", lambda e: jog_on(1, -get_jog_speed(1)))
root_window.bind("<KeyRelease-Up>", lambda e: jog_off(1))
root_window.bind("<KeyRelease-Down>", lambda e: jog_off(1))
root_window.bind("<Left>", lambda e: jog_on(0, -get_jog_speed(0)))
root_window.bind("<Right>", lambda e: jog_on(0, +get_jog_speed(0)))
root_window.bind("<KeyRelease-Left>", lambda e: jog_off(0))
root_window.bind("<KeyRelease-Right>", lambda e: jog_off(0))
root_window.bind("<q>", lambda e: jog_on(2, +get_jog_speed(2)))
root_window.bind("<x>", lambda e: jog_on(2, -get_jog_speed(2)))
root_window.bind("<KeyRelease-q>", lambda e: jog_off(2))
root_window.bind("<KeyRelease-x>", lambda e: jog_off(2))
4. open a terminal window and look for your gamepad
bluez-test-discorery
5. pair the bluetooth gamepad wiht some like:
sudo hidd --connect MAC_ADDRESS
So far it works, but I have to connect it by hand every time (not so bad). In the future I will use the other buttons to connect the spindle and to change the travel speed.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23288
- Thank you received: 4936
23 Sep 2015 20:43 #62888
by andypugh
Replied by andypugh on topic $10 Bluetooth Pendant
Have you tried configuring it via halui and hal)input instead?
wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_Remote_Pendant
wiki.linuxcnc.org/cgi-bin/wiki.pl?Adding...imple_Remote_Pendant
wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_Remote_Pendant
wiki.linuxcnc.org/cgi-bin/wiki.pl?Adding...imple_Remote_Pendant
Please Log in or Create an account to join the conversation.
- LearningLinuxCNC
-
- Offline
- Elite Member
-
Less
More
- Posts: 319
- Thank you received: 48
23 Sep 2015 20:49 #62889
by LearningLinuxCNC
You might try the last step listed here to make it automatically reconnect. I have not tried this.
Replied by LearningLinuxCNC on topic $10 Bluetooth Pendant
So far it works, but I have to connect it by hand every time (not so bad).
You might try the last step listed here to make it automatically reconnect. I have not tried this.
Please Log in or Create an account to join the conversation.
Time to create page: 0.104 seconds