Fiddling around with valot.instanssi.org lights and Node.JS
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
lights.js
lighttest.js

README.md

Lights

Stolen ideas from https://github.com/epeli/node-lights !

Control valot.instanssi.org lights by with Node.js.

You can add events to a queue which will be then executed in the order you've created them. You can also wait by using events.waitFor(ms) .

var lights = require("./lights.js");

var lghts = new lights.Lights("85.188.10.47", 1234);
var events = new lights.LightEvents(lghts);

var r = 0;
var b = 0;
var g = 0;
var maxLights = 13;
var end = 12;

for(var begin=0; begin < maxLights; begin++,end--) {
    for(var c = 0; c < 256; c++) {
        events.light(begin, c, b, g);
        events.light(end, r, c, g);
        events.light(begin, r, b, c);
    }
}

events.execute();