<commit_before>node-blink1
===========

A node.js library for the [blink(1)](http://www.kickstarter.com/projects/thingm/blink1-the-usb-rgb-led) by [ThingM](http://thingm.com)

Install
-------

    npm install node-blink1

Usage
-----

    var Blink1 = require('blink1');

Get list of blink(1) devices connected:

    Blink1.devices(); // returns array of serial numbers
    
Create blink(1) object without serial number, uses first device:

    var blink1 = new Blink1.Blink1();
    
Create blink(1) object with serial number, to get list of serial numbers use `Blink1.devices()`:

    var blink1 = new Blink1.Blink1();
    

Get version:

    blink1.version(callback(version))
    
__Set colors__
    
Fade to RGB, optional callback called after `fadeMillis` ms:
    
    blink1.fadeToRGB(fadeMillis, r, g, b, [callback])
    
Set RGB:

    blink1.setRGB(fadeMillis, r, g, b, [callback])
    
__Other methods__
    
Set server down (on, off), optional callback called after `millis` ms:
<commit_msg>- fix docs<commit_after>node-blink1
===========

A node.js library for the [blink(1)](http://www.kickstarter.com/projects/thingm/blink1-the-usb-rgb-led) by [ThingM](http://thingm.com)

Install
-------

    npm install node-blink1

Usage
-----

    var Blink1 = require('blink1');

Get list of blink(1) devices connected:

    Blink1.devices(); // returns array of serial numbers
    
Create blink(1) object without serial number, uses first device:

    var blink1 = new Blink1.Blink1();
    
Create blink(1) object with serial number, to get list of serial numbers use `Blink1.devices()`:

    var blink1 = new Blink1.Blink1(serialNumber);
    

Get version:

    blink1.version(callback(version))
    
__Set colors__
    
Fade to RGB, optional callback called after `fadeMillis` ms:
    
    blink1.fadeToRGB(fadeMillis, r, g, b, [callback])
    
Set RGB:

    blink1.setRGB(fadeMillis, r, g, b, [callback])
    
__Other methods__
    
Set server down (on, off), optional callback called after `millis` ms:

{'fraction_non_alphanumeric': 0.1289198606271777, 'fraction_numerical': 0.019910403185664508, 'mean_word_length': 3.276595744680851, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6214080', 'n_tokens_mistral': 691, 'n_tokens_neox': 662, 'n_words': 200}