Blync for Node.js
This library lets you control a Blync (RGB led for
USB).
Installation
Prerequisites
We use the NPM module node-hid
which has a few dependencies:
- Mac OS (I use 10.6.8) or Linux (kernel 2.6+) or Windows XP+
- libudev-dev (Linux only)
- libusb-1.0-0-dev (Ubuntu versions missing libusb.h only)
Ubuntu
sudo apt-get install libudev-dev libusb-1.0-0-dev
npm install blync
MacOS
// TODO
Usage
var blync = require('blync');
var deviceCount = blync.getDevices().length;
var device = blync.getDevice(0);
device.setColor('red');
device.blinkColor('blue', 250);
process.on( 'SIGINT', function() {
device.turnOff();
process.exit(0);
});