1.0.6 • Published 10 years ago

steam-controller v1.0.6

Weekly downloads
3
License
ISC
Repository
github
Last release
10 years ago

node-steam-controller

Description

The module lets you interact with the Steam Controller from valve. Its been tested on OSX so far and works great - it should be compatible with Windows and Linux as well.

Usage

npm install steam-controller
var steam = require('steam-controller');

var controller = new steam.steamController();

controller.connect();

controller.read(function(data){
  console.log(data);
});

Response

"button": {
  "A": false,
  "B": false,
  "X": false,
  "Y": false,
  "LB": false,
  "RB": false
},
"pad": {
  "value": "idle",
  "touched": false
},
"mouse": {
  "a": 0,
  "b": 0,
  "c": 0,
  "d": 0,
  "touched": false
},
"center": {
  "L": false,
  "R": false,
  "STEAM": false
},
"joystick": {
  "xdir": 0,
  "x": 0,
  "ydir": 0,
  "y": 0
},
"bottom": {
  "left": false,
  "right": false
},
"thumbstick": {
  "pressed": false,
  "xdir": 0,
  "x": 0,
  "ydir": 0,
  "y": 0
},
"trigger":{
  "left": 0,
  "right": 0
}

Note: sometimes it won't disconnect and reconnect to the controller right away when you restart a script. This is a fresh project so I'm working on making it more consistent, just keep in mind you may need to unplug and restart your controller if your script won't reconnect.

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.0

10 years ago