npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-opc-server

v1.0.4

Published

Open Pixel Control parser

Downloads

14

Readme

node-opc-server

Open Pixel Control protocol parser

node-opc-server implements the Open Pixel Control protocol and drives ws281x RGB LEDs using the rpi-ws281x-native library.

System overview

 PC or Raspi running -> Network -> Raspi #18 -> 3.3V -> 5V -> NeoPixel
 grid8x8_dot.pde                                              8x8 array
  • Drives one WS2812 LED strip up to 1024 LEDs but only tested up to 128 LEDs.

  • Implements the Open Pixel Control protocol on TCP port 7890. This is the same protocol used by Fadecandy server (fcserver).

This is not a Fadecandy controller hardware clone. Fadecandy has advanced features not implemented by this program.

  • No dithering.
  • No keyframe interpolation.
  • Fixed gamma correction of 2.2
  • SysEx ignored.

Use it

I recommend running Raspian Jessie.

Install node 4.2.1 (as of March 8, 2016) from http://node-arm.herokuapp.com/.

wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
node -v

Install this package.

npm install node-opc-server
cd node_modules/node-opc-server/opc-server
npm install
sudo node index.js

Example programs to drive the LEDs

Many open pixel control and Fade Candy examples work with node-opc-server. If the example code is not running on the Raspi running opc-server, be sure to modify the examples with the Raspi IP address.

The following examples from https://github.com/zestyping/openpixelcontrol work.

python\_clients/
    lava_lamp.py,miami.py,nyan_cat.py,sailor_moon.py,spatial_stripes.py
$ ./lava\_lamp.py -l grid8x8.json -s <Raspi IP addr>:7890 -f 30

The Fadecandy grid8x8 Processing examples at https://github.com/scanlime/fadecandy work with this program. These examples show how to create interactive LED displays. Edit the PDE file to add the Raspi IP address.

examples/processing/
    grid8x8_dot, grid8x8_noise_sample, grid8x8_orbits, grid8x8_wavefronts

Changes

v1.0.4 Verified to work on a Raspberry Pi 2, Raspian Jessie, and nodejs 4.2.1 from http://node-arm.herokuapp.com/

References

The rpi-ws281x-native library is used to drive the WS281x LEDs. See https://www.npmjs.com/package/rpi-ws281x-native for more details.

See https://github.com/zestyping/openpixelcontrol for the OPC protocol specification.

The following Adafruit LED art tutorial covers wiring and powering the LEDs, etc. In addition, it covers installing and running Fadecandy example programs.

https://learn.adafruit.com/led-art-with-fadecandy/