Rename USB scripts according to the recent USB command renames.
This commit is contained in:
12
packages/usb/blink-led-pwm-brithness.js
Executable file
12
packages/usb/blink-led-pwm-brithness.js
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env node
|
||||
const uhk = require('./uhk');
|
||||
|
||||
let areLedsEnabled = true;
|
||||
|
||||
const device = uhk.getUhkDevice();
|
||||
setInterval(() => {
|
||||
areLedsEnabled = !areLedsEnabled;
|
||||
const brightnessPercent = areLedsEnabled ? 100 : 0;
|
||||
|
||||
device.write(uhk.getTransferData(new Buffer([uhk.usbCommands.setLedPwmBrightness, brightnessPercent])));
|
||||
}, 500);
|
||||
Reference in New Issue
Block a user