color-strip

1.0.0 • Public • Published

Color Strip

Node.js interface to control the adafruit RGB LED strip.

Installation

  1. Install node.js on your rasberry pi (I recommend using nvm)

  2. Install this package:

    npm install color-strip
    
  3. Enable spi manually or using raspi-config (the option to enable spi is under "Advanced Options").

  4. Wire up!

Useage

 
var ColorStrip = require('color-strip');
var strip = new ColorStrip({
  device: '/dev/spidev0.0',
  numberLEDs: 32
});
 
// set led 0 to white, led 1 to red, led 2 to green, and led 3 to blue
strip.setColor(0, 127, 127, 127)
strip.setColor(1, 127, 0, 0)
strip.setColor(2, 0, 127, 0)
strip.setColor(3, 0, 0, 127)
 
// flush the colors to the strip
strip.transfer()
 
// or use the hex interface
strip.setColorFromRGBHex(0, '#43BFCE')
strip.transfer()

Readme

Keywords

none

Package Sidebar

Install

npm i color-strip

Weekly Downloads

2

Version

1.0.0

License

none

Last publish

Collaborators

  • ibash