Skip to content

Various examples using the DualShock 4 controller

License

Notifications You must be signed in to change notification settings

itaisteinherz/ds-examples

Repository files navigation

ds-examples Build Status

Various examples using the DualShock 4 controller

Install

$ git clone https://github.com/itaisteinherz/ds-examples.git
$ cd ds-examples
$ yarn

Note that using npm instead of yarn currently fails because of an issue with node-hid (I've already opened a PR to resolve this in node-dualshock-controller - rdepena/node-dualshock-controller#82).

Usage

$ node index.js

Notes

Running the different examples

If you connect the controller to your computer using bluetooth, you can only access the buttons and D-pads, which means you will only be able to run the basic.js example.

To run the rest of the examples (flash.js, light.js, rumble.js and touchpad.js), connect the controller to your computer using a micro-USB cable, which will allow you to access the touchpad, the main LED of the controller and its rumble motors.

License

MIT © Itai Steinherz