65 lines
1.1 KiB
JavaScript
65 lines
1.1 KiB
JavaScript
const mod = require('.')
|
|
|
|
const o = mod.openOutput("/dev/ttyUSB0")
|
|
|
|
if (o.type !== "success") {
|
|
return
|
|
}
|
|
|
|
const movingHeads = [
|
|
{
|
|
startAddress: 1,
|
|
pan: 0,
|
|
tilt: 0,
|
|
brightness: {
|
|
type: "dimmer",
|
|
value: 1,
|
|
},
|
|
rgbw: [255, 0, 0, 0],
|
|
speed: 0,
|
|
reset: false,
|
|
},
|
|
{
|
|
startAddress: 15,
|
|
pan: 0,
|
|
tilt: 0,
|
|
brightness: {
|
|
type: "dimmer",
|
|
value: 1,
|
|
},
|
|
rgbw: [255, 0, 0, 0],
|
|
speed: 0,
|
|
reset: false,
|
|
},
|
|
{
|
|
startAddress: 29,
|
|
pan: 0,
|
|
tilt: 0,
|
|
brightness: {
|
|
type: "dimmer",
|
|
value: 1,
|
|
},
|
|
rgbw: [255, 0, 0, 0],
|
|
speed: 0,
|
|
reset: false,
|
|
},
|
|
{
|
|
startAddress: 43,
|
|
pan: 0,
|
|
tilt: 0,
|
|
brightness: {
|
|
type: "dimmer",
|
|
value: 1,
|
|
},
|
|
rgbw: [0, 255, 0, 0],
|
|
speed: 1,
|
|
reset: false,
|
|
}
|
|
];
|
|
|
|
|
|
r = o.set(movingHeads);
|
|
console.log(r);
|
|
|
|
o.close();
|