From c3457e33b703d8246bd06058e027f1e636b0830c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Mon, 16 Jan 2017 01:00:35 +0100 Subject: [PATCH] Add script. --- usb/mess-up-leds.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 usb/mess-up-leds.js diff --git a/usb/mess-up-leds.js b/usb/mess-up-leds.js new file mode 100755 index 00000000..8d05ca48 --- /dev/null +++ b/usb/mess-up-leds.js @@ -0,0 +1,9 @@ +#!/usr/bin/env node +let uhk = require('./uhk'); +const LED_CONTROL_REGISTER = 0; +uhk.sendUsbPackets([ + new Buffer([uhk.usbCommands.writeLedDriver, uhk.leftLedDriverAddress, 18, LED_CONTROL_REGISTER, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), + new Buffer([uhk.usbCommands.writeLedDriver, uhk.rightLedDriverAddress, 18, LED_CONTROL_REGISTER, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]) +]);