cncjs / cncjs-pendant-keyboard

A simple pendant (using wireless keyboard or usb) to CNCJS
MIT License
24 stars 24 forks source link

Xbox360 USB using #8

Open kLeR1k opened 5 years ago

kLeR1k commented 5 years ago

Hello there! I have Xbox 360 USB controller, after connecting it with Pi I see it in lsusb like: Bus 001 Device 004: ID 045e:028e Microsoft Corp. Xbox360 Controller And /dev/input/js0 existing too, but when i try to run cncjs-pendant-keyboard i cannot see it in listed ports. Also AntiMicro works fine with controller - I can make some binding settings and they works like keyboard buttons well. Any ideas how can i use xbox360 controller with cncjs-pendant-keyboard? Also tried to go with cncjs-pendant-ps3 from steps "Install NodeJS Libraries", modified Vendor and Product IDs at step "Create udev Rules", but anyway cannot see ttyUSB0 in /dev

AustinSaintAubin commented 5 years ago

Just for clarification. I assume that you cannot connect to /dev/ttyUSB0 with the pendant. This likely means that the pendant software is not connecting to CNCjs to list the available connections.

Does CNCjs work without the pendant? Is CNCjs running before you start the pendant software?

kLeR1k commented 5 years ago

Oops, should i select serial port of my grbl board (like in CNCjs), not my USB keyboard(gamepad) controller (as I supposed)?

kLeR1k commented 5 years ago

Tried to use serial port of my CNC controller (ttyUSB0), but getting this error: Error: cannot open device with path 0001:0006:00 at new HID (/home/pi/cncjs-pendant-keyboard-master/node_modules/node-hid/nodehid.js:24:17) at /home/pi/cncjs-pendant-keyboard-master/bin/cncjs-pendant-keyboard:108:29 at Socket.<anonymous> (/home/pi/cncjs-pendant-keyboard-master/index.js:76:9) at Socket.Emitter.emit (/home/pi/cncjs-pendant-keyboard-master/node_modules/component-emitter/index.js:133:20) at Socket.onevent (/home/pi/cncjs-pendant-keyboard-master/node_modules/socket.io-client/lib/socket.js:270:10) at Socket.onpacket (/home/pi/cncjs-pendant-keyboard-master/node_modules/socket.io-client/lib/socket.js:228:12) at Manager.<anonymous> (/home/pi/cncjs-pendant-keyboard-master/node_modules/component-bind/index.js:21:15) at Manager.Emitter.emit (/home/pi/cncjs-pendant-keyboard-master/node_modules/component-emitter/index.js:133:20) at Manager.ondecoded (/home/pi/cncjs-pendant-keyboard-master/node_modules/socket.io-client/lib/manager.js:332:8) at Decoder.<anonymous> (/home/pi/cncjs-pendant-keyboard-master/node_modules/component-bind/index.js:21:15) Also tried to complete steps "Create udev Rules" and "QUICK FIX for node-hid hidraw... PLEASE HELP IF YOU KNOW FIX" from cncjs-pendant-ps3 - nothing changes.

kLeR1k commented 5 years ago

Also added some udevadm monitor output and x360 rule (just changed its extension to txt for uploading) wout_udev.txt

61-x360.rules.txt

nsfilho commented 4 years ago

@kLeR1k an important thing about pendant keyboard is a map of keys. Today, the project only use a specific type of keyboard. In future, I plan to improve the project for use another devices as joysticks and create a custom map.

Anyways, if I can help you with anything, please let me know.

Today, you can find a supported keyboard for less than USD$7 and you can map more "commands" to your cnc.

jordansissel commented 3 years ago

@nsfilho Do you think gamepads/etc should go in this repo (pendant-keyboard) or a new one? I'm also interested and can help contribute code.