node-blink1
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "node-blink1", | ||
"version": "0.0.1", | ||
"description": "A node.js library for the blink(1).", | ||
"keywords": [ | ||
"blink(1)", | ||
"blink1" | ||
], | ||
"dependencies": { | ||
"node-hid": "0.1.x" | ||
} | ||
} | ||
"name": "node-blink1", | ||
"description": "A node.js library for the blink(1).", | ||
"version": "0.0.2", | ||
"author": { | ||
"name": "Sandeep Mistry", | ||
"email": "sandeep.mistry@gmail.com", | ||
"url": "https://github.com/sandeepmistry" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/sandeepmistry/node-blink1.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/sandeepmistry/node-blink1/issues" | ||
}, | ||
"keywords": [ | ||
"blink(1)", | ||
"blink1" | ||
], | ||
"dependencies": { | ||
"node-hid": "0.1.x" | ||
}, | ||
"devDependencies": { | ||
"jshint": "latest", | ||
"mocha": "latest", | ||
"should": "latest", | ||
"mockery": "latest", | ||
"cucumber": "latest" | ||
}, | ||
"scripts": { | ||
"pretest": "jshint src/ test/", | ||
"test": "mocha -R spec test/unit.js" | ||
}, | ||
"main": "./src/blink1" | ||
} |
node-blink1 | ||
=========== | ||
A node.js library for the blink(1) | ||
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('node-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(r, g, b, [callback]) | ||
__Other methods__ | ||
Set server down (on, off), optional callback called after `millis` ms: | ||
blink1.serverDown(on, millis, [callback]) | ||
Play: | ||
blink1.play = function(play, position, [callback]) | ||
Write pattern line: | ||
blink1.writePatternLine(fadeMillis, r, g, b, position, [callback]) | ||
Read pattern line: | ||
blink1.readPatternLine(position, [callback]) | ||
License | ||
======== | ||
Copyright (C) 2012 Sandeep Mistry <sandeep.mistry@gmail.com> | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
11
test.js
@@ -1,2 +0,2 @@ | ||
var Blink1 = require('./blink1'); | ||
var Blink1 = require('./src/blink1'); | ||
@@ -7,10 +7,11 @@ console.log(Blink1.devices()); | ||
console.log(blink1.version()); | ||
blink1.version(function(version) { | ||
console.log(version); | ||
}); | ||
blink1.fadeToRGB(1000, 255, 255, 0, function() { | ||
console.log('done'); | ||
blink1.setRGB(255, 0, 0); | ||
blink1.serverDown(5000, function() { | ||
console.log('server down'); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
19909
9
0
448
0
72
5
1