npm:@cameronhunter/blinkstick | Skypack
You need to enable JavaScript to run this app.
Usage no npm install needed!
<script type="module">
import cameronhunterBlinkstick from 'https://cdn.skypack.dev/@cameronhunter/blinkstick';
</script>
README
BlinkStick Node provides an interface to control Blinkstick
devices connected to your computer with Node.js.
What is BlinkStick? It's a smart USB-controlled LED device. More info about it here:
http://www.blinkstick.com
Resources
Requirements
Node.js
Libusb for Mac OSX and Linux
Requirements for Mac OSX
Install Node with npm and libusb using homebrew :
gt; brew install node
gt; brew install libusb
Requirements for Windows
Install Node for Windows and make sure it's added
to your PATH environment variable.
Requirements for Linux
gt; sudo apt-get install libusb nodejs npm
Raspberry Pi
The apt repositories keep a very old version of NodeJS. Please install the
Node ARM Binaries from the official site. Run the
following command to confirm the architecture of your Raspberry Pi.
gt; uname -m
Addionally, you will need to install libudev-dev rather than libusb.
gt; sudo apt-get install libudev-dev -y
Install BlinkStick node module
Install using npm:
gt; npm install blinkstick
Getting started
var blinkstick = require('blinkstick');
To get the first blinkstick on your system:
var device = blinkstick.findFirst();
To set the color:
led.blink('random', function(){
led.pulse('random', function(){
led.setColor('red', function(){
});
});
});
More details and examples available in the wiki:
https://github.com/arvydas/blinkstick-node/wiki
Permission problems
If you get an error message on Linux:
Error: LIBUSB_ERROR_ACCESS
Please run the following command and restart your computer:
echo "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"20a0\", ATTR{idProduct}==\"41e5\", MODE:=\"0666\"" | sudo tee /etc/udev/rules.d/85-blinkstick.rules
Maintainers
Copyright and License
Copyright (c) 2014 Agile Innovative Ltd and contributors
Released under MIT license.
Details
Updated
June 29, 2019
Created
June 29, 2019
Package Security
ES Module Entrypoint
Info
Export Map
Info
added
Keywords
added
License
added
README
added
Repository URL
TypeScript Types
Info
License
MIT
Dependencies
1