Interface for Xbox 360 game controller into Node.js
Lots of low level details about the controller here:
var XboxController = ;var xbox = ;xbox;xbox;xbox;xbox;xbox;xbox;xbox;xbox;
Also see the
example.js for usage.
Set LED pattern on controller:
Available LED patterns:
0x00 All off 0x01 All blinking 0x02 1 flashes, then on 0x03 2 flashes, then on 0x04 3 flashes, then on 0x05 4 flashes, then on 0x06 1 on 0x07 2 on 0x08 3 on 0x09 4 on 0x0A Rotating (e.g. 1-2-4-3) 0x0B Blinking* 0x0C Slow blinking* 0x0D Alternating (e.g. 1+4-2+3), then back to previous*
Control left and right rumble motors:
var leftStrength = 255;var rightStrength = 255;xbox;
Where the strengths are between 0 and 255.
Listen for when a trigger or stick's position is within a particular range:
On startup, if a device is in use, it will be skipped and the next available device will be used. The serial number and path will be printed to the console for debugging.
Use the printed serial number to specifically address devices if required, see Serial Numbers below.
Each device has own serial number. On startup, the serial number of the device detected will be printed to the console.
To use a specific serial number, specify it when creating the controller:
var xbox = '9BB004D0';
If you have a third party controller without 'controller' in the name, specify the device serial number to use that device.
To configure a third party controller:
Copyright (c) 2015 Andrew Nesbitt. See LICENSE for details.