Stuff for a fadecandy+neopixel hack project
The following env vars override any provided CLI flags
- LAYOUT - layout file (./layout_16x8z.json)
- OPC_HOST - OPC server host (localhost)
- OPC_PORT - OPC server UDP port (7890)
- PORT - http listen port
- PATTERNS_DIRECTORY - directory to pull in pattern functions (./patterns)
$ npm install
...
$ npm start -- -h
> fadecandy-orb-lamp@ start /home/gabe/code/fadecandy-orb-lamp
> node app.js "-h"
Usage: app.js [options]
Options:
--layout Layout JSON file describing how LEDs are positioned
[default: "./layout_16x8z.json"]
--opc-host OPC host to connect to [default: "localhost"]
--opc-port OPC UDP port [default: 7890]
--port HTTP port to serve web UI and API on [default: 3000]
--patterns-directory Directory to find all the pattern modules
[default: "./patterns"]
--initial-pattern Start running a given pattern on startup (without .js
suffix)
-h, --help Show help [boolean]
The orb is made of a few parts
- Fadecandy
- Raspberry Pi 2
- USB Wifi Dongle
- Massive 10A power supply
- Clear plastic hamster ball
- Lots of WS2811 LED strips
- Lots of solder and electrical tape
The RPi runs the fadecandy server, as well as the nodejs web UI and control component. Patterns are implemented as a simple node module that exports a draw(model,client,data)
function. User supplied data can be passed into each draw function via data
, client is the OCP client for drawing on the orb, and model
is the layout model for how the pixels exist in space.
For images of assembly, check out all these binary blobs in git!
The central orb with LEDs:
Quick gif of one of the patterns:
Example of the web UI included. It provides control over what pattern is running, and can provide some user control over base colors used, animation period, intensity, and can shutdown or restart the lamp.
Click each thumbnail to see the video!