Skip to content

EdenTurgeman/xbox-ctrl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xbox-ctrl

Node api for the xbox controller

Installation

As cli tool

$ [sudo] npm install xbox-ctrl -g

Programmatically

$ [sudo] npm install xbox-ctrl --save

Usage

CLI

Options

$ xbox-ctrl --help

  Usage: xbox-ctrl <command>


  Commands:

    off [options] [controllers...]      Turn off controllers
    vibrate [options] [controllers...]  Vibrate controllers
    list                                List connected controllers

  Node api for the xbox controller

  Options:

    -h, --help     output usage information
    -V, --version  output the version number

Synonym

This module is exported as xbox-ctrl and as xctrl.

Programmatically

Example

const xboxCtrl = require('xbox-ctrl');

// list connected controllers
xboxCtrl.list(); // => [1, 2]

// turns off controller 1
xboxCtrl.off(1);

// turns off all controllers
xboxCtrl.offAll();

// vibrate controller 1
xboxCtrl.vibrate(1);

// vibrate all controllers
xboxCtrl.vibrateAll();

License

MIT

About

Node api for the xbox controller

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 61.5%
  • C++ 36.4%
  • Python 2.1%