{
  "name": "cylon-joystick-node-4-and-5",
  "version": "0.20.0",
  "description": "Cylon module for any HID joystick",
  "homepage": "http://cylonjs.com",
  "bugs": {
    "url": "https://github.com/hybridgroup/cylon-joystick/issues"
  },
  "author": {
    "name": "The Hybrid Group",
    "email": "cylonjs@hybridgroup.com"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/hybridgroup/cylon-joystick.git"
  },
  "bin": {
    "cylon-joystick-explorer": "./bin/cylon-joystick-explorer"
  },
  "license": "Apache-2.0",
  "keywords": [
    "cylon",
    "cylonjs",
    "cylons",
    "robot",
    "robots",
    "robotics",
    "iot",
    "hardware",
    "joystick",
    "gamepad",
    "xbox",
    "xbox360",
    "ps2",
    "ps3",
    "dualshock",
    "dualshock3",
    "dualshock4"
  ],
  "devDependencies": {
    "sinon-chai": "^2.8.0",
    "chai": "^3.2.0",
    "mocha": "^2.2.5",
    "sinon": "^1.15.4",
    "eslint": "^0.22.1"
  },
  "dependencies": {
    "cylon": "~1.2.0",
    "gamepad": "^1.2.2"
  },
  "gitHead": "e25adc2586d220c3d73a5e4b0666d4787cea6adf",
  "readme": "# Cylon.js for Joysticks and Controllers\n\nNOTE: This module will be deprecated when the [cylon-joystick](http://npm.im/cylon-joystick) supports node 4 and 5. \n\nCylon.js (http://cylonjs.com) is a JavaScript framework for robotics, physical computing, and the Internet of Things (IoT).\n\nThis repository contains the adaptor/driver for communicating with joysticks and game controllers. It can be used with any [SDL][http://www.libsdl.org/]-compatible controller.\n\nDefault bindings are provided for the Xbox 360, DualShock 3, DualShock 4, and Logitech F310 controllers.\n\nThe cylon-gamepad implementation is made possible by the gamepad module [https://github.com/creationix/node-gamepad](https://github.com/creationix/node-gamepad) created by [@creationix](https://github.com/creationix) thank you!\n\nWant to use Ruby on robots? Check out our sister project Artoo (http://artoo.io)\n\nWant to use the Go programming language to power your robots? Check out our sister project Gobot (http://gobot.io).\n\n[![Build Status](https://secure.travis-ci.org/hybridgroup/cylon-joystick.png?branch=master)](http://travis-ci.org/hybridgroup/cylon-joystick) [![Code Climate](https://codeclimate.com/github/hybridgroup/cylon-joystick/badges/gpa.svg)](https://codeclimate.com/github/hybridgroup/cylon-joystick) [![Test Coverage](https://codeclimate.com/github/hybridgroup/cylon-joystick/badges/coverage.svg)](https://codeclimate.com/github/hybridgroup/cylon-joystick)\n\n## How to Install\nInstalling Cylon.js with Joystick support is pretty easy.\n\n    $ npm install cylon cylon-joystick\n\n### Note\n\n- OS X does not provide native support for Xbox 360 controllers. As such, a [third-party driver is required](https://github.com/d235j/360Controller/releases).\n- If you're using a PS3 controller and want to communicate with it over USB, plug it in and then press the PlayStation button to make sure it's connected.\n\n## How to Use\n\n```javascript\nvar Cylon = require('cylon');\n\nCylon.robot({\n  connections: {\n    joystick: { adaptor: 'joystick' }\n  },\n\n  devices: {\n    controller: { driver: 'dualshock-3' }\n  },\n\n  work: function(my) {\n    [\"square\", \"circle\", \"x\", \"triangle\"].forEach(function(button) {\n      my.controller.on(button + \":press\", function() {\n        console.log(\"Button \" + button + \" pressed.\");\n      });\n\n      my.controller.on(button + \":release\", function() {\n        console.log(\"Button \" + button + \" released.\");\n      });\n    });\n\n    my.controller.on(\"left_x:move\", function(pos) {\n      console.log(\"Left Stick - X:\", pos);\n    });\n\n    my.controller.on(\"right_x:move\", function(pos) {\n      console.log(\"Right Stick - X:\", pos);\n    });\n\n    my.controller.on(\"left_y:move\", function(pos) {\n      console.log(\"Left Stick - Y:\", pos);\n    });\n\n    my.controller.on(\"right_y:move\", function(pos) {\n      console.log(\"Right Stick - Y:\", pos);\n    });\n  }\n}).start();\n```\n\n## How to Connect\n\nPlug your USB joystick or game controller into your USB port.\nIf your device is supported by SDL, you are now ready.\n\n## Custom joysticks\n\nIf you don't have one of the joysticks we support natively, or want to make changes to the configuration, `cylon-joystick` supports custom bindings.\n\nTo use a custom joystick with Cylon, simply supply the joystick bindings file when you're describing the device:\n\n```javascript\nvar Cylon = require('cylon');\n\nvar config = __dirname + \"/controller.json\"\n\nCylon.robot({\n  connections: {\n    joystick: { adaptor: 'joystick' }\n  },\n\n  devices: {\n    controller: { driver: \"joystick\", config: config }\n  },\n\n  work: function(my) {\n    // your custom mappings will be reflected here as events\n  }\n}).start();\n```\n\nA joystick bindings file needs to contain the device's `productID` and `vendorID`, as this is how cylon-joystick will find the appropriate device.\n\nFor an example of what a bindings file should look like, [here is the Xbox 360 controller bindings file we use][xbox-bindings].\n\n[xbox-bindings]: https://github.com/hybridgroup/cylon-joystick/blob/master/lib/config/xbox_360.json\n\n## `cylon-joystick-explorer`\n\n`cylon-joystick` includes the `cylon-joystick-explorer` binary.\nIt's useful for figuring out what compatible gamepads you have connected, as well as making it easier to generate custom bindings JSON files.\n\nFor best use, install `cylon-joystick` globally:\n\n    $ npm install -g cylon-joystick\n\nThen just run the command:\n\n    $ cylon-joystick-explorer\n\n## Documentation\n\nWe're busy adding documentation to our web site at http://cylonjs.com/ please check there as we continue to work on Cylon.js\n\nThank you!\n\n## Contributing\n\nFor our contribution guidelines, please go to [https://github.com/hybridgroup/cylon/blob/master/CONTRIBUTING.md\n](https://github.com/hybridgroup/cylon/blob/master/CONTRIBUTING.md\n).\n\n## Release History\n\nFor the release history, please go to [https://github.com/hybridgroup/cylon-joystick/blob/master/RELEASES.md\n](https://github.com/hybridgroup/cylon-joystick/blob/master/RELEASES.md\n).\n\n## License\n\nCopyright (c) 2013-2016 The Hybrid Group. Licensed under the Apache 2.0 license.\n",
  "readmeFilename": "README.md",
  "_id": "cylon-joystick-node-4-and-5@0.19.2",
  "scripts": {},
  "_shasum": "138bf752450c9bdf03d1bb895a22c32452530f09",
  "_from": "cylon-joystick-node-4-and-5@>=0.19.2 <0.20.0"
}
