node-blink
Basic nodejs bindings for blink(1).
npm install node-blink
var blink = require('../');
blink(function(err, b) {
b.blink();
b.blink([255, 0, 0], 1000, [0, 0, 0]);
b.set([0, 10, 50], 1000);
b.set([255, 0, 100]);
b.set('#ace');
b.set('cyan');
b.set('hsl(35, 100%, 50%)');
b.on();
b.off();
console.log(b.version());
var angle = 0;
setInterval(function() {
if (++angle > 360) angle = 0;
b.set('hsl(' + angle + ', 100%, 50%)');
}, 100);
});
Uses
See blink-reporter, a mocha
test reporter for the blink(1).
Check out the examples in examples/
.
One of them is pretty advanced: try npm install -g darksky
and use a
darksky api key to do weather forecasts.
See Also