dmx-flok/demo_simple.js
2018-12-27 21:51:25 +00:00

20 lines
409 B
JavaScript

const DMX = require('./dmx');
const dmx = new DMX();
// var universe = dmx.addUniverse('demo', 'enttec-open-usb-dmx', '/dev/cu.usbserial-6AVNHXS8')
const universe = dmx.addUniverse('demo', 'null');
let on = false;
setInterval(() => {
if (on) {
on = false;
universe.updateAll(0);
console.log('off');
} else {
on = true;
universe.updateAll(250);
console.log('on');
}
}, 1000);