Created
May 14, 2014 18:25
-
-
Save johannilsson/caba3f63d7e90af406ce to your computer and use it in GitHub Desktop.
HID test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var HID = require('node-hid'); | |
var devices = HID.devices() | |
console.log(devices); | |
// Set path here. | |
var path = ''; | |
var device = new HID.HID(path); | |
device.on('data', function(data) { | |
console.log('GOT DATA: ', data); | |
}); | |
device.on('error', function(err) { | |
console.log('GOT ERROR: ', err); | |
}); | |
console.log('WRITE'); | |
device.write([0x00, 0x01, 0x01, 0x05]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment