andrew / node-xbox-controller

:video_game: [UNMAINTAINED] Interface for Xbox 360 game controller into Node.js
http://libraries.io/npm/xbox-controller
MIT License
270 stars 49 forks source link

Raspberry pi + xboxdrv #22

Closed PrestaSafe closed 10 years ago

PrestaSafe commented 10 years ago

Hi, It works fine with my mac, but i tried to connect it with my raspberry pi but Xbox controller is not find. I've installed xboxdrv the controller works but if i tried to connect with node xbox controller, the controller is still not find. Can you help me ?

JamieKnight commented 10 years ago

Hiya Gulliaume23,

Small world, I had this exact issue, see https://github.com/andrew/node-xbox-controller/issues/21 TL:DR the library this depends on ((HIDAPI) ) won't work on ubuntu for some reason... the raspbian distribution appears to have picked up the same bug.

I wrote a bit about how i approached the issue here: http://jkg3.com/Journal/accessing-xbox-controller-events-in-nodejs-on-a-raspberry-pi which includes a mapping for most of the buttons and a method for accessing them.

Cheers,

Jamie + Lion

PrestaSafe commented 10 years ago

Hi, if i understand, i juste need to use your module and it will works ? Sorry, it a little bit hard to understand cause i'm french.

JamieKnight commented 10 years ago

Hiya,

At the bottom of the article above I link place where i have a system working. If you read through that you can see how it works.

It's not as refined as the code here so I would not advocate it as a replacement module.

However the module it depends on (node-joystick) works fine on the raspberry pi, its just missing the mapping of events to buttons.

Jamie + Lion

andrew commented 10 years ago

Thanks for investigating this @JamieKnight