Giter Site home page Giter Site logo

node-opc-server's Introduction

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/

node-opc-server's People

Contributors

bbx10 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.