MagicMirror module to control a led strip attached to a Raspberry Pi.
Currently this module is only able to control 'ws281x' stripes. Neopixels or any other WS2812 stripe should work fine. I will try to add support for other chips as soon as the basic functions are ready.
cd ~/MagicMirror/modules
git clone https://github.com/paviro/MMM-Stripes.git
sudo apt-get install scons
cd MMM-Stripes
npm installOpen the file ~/MagicMirror/config/config.js and add the following to your modules section:
modules: [
{
module: 'MMM-Stripes',
config: {
ledCount: 60,
type: 'ws281x',
gpio: 18
}
}
]| Option | Type | Default | Description |
|---|---|---|---|
ledCount |
Integer | 60 |
Number of LEDs on your strip. |
gpio |
String | 18 |
The GPIO-Pin your strip is connected to. Must support PMW! |
animationSpeed |
Integer | 20 |
Animation speed. |
animationCycles |
Integer | 2 |
Animation duration. |
flashOnAlert |
boolean | true |
Trigger a pulse animation when a notification is shown. |
flashColor |
text | red |
Color of the flash (blue, rgb(25,200,200), #F04B23). |
flashCycles |
Integer | 2 |
Animation duration. |
Currently supports messages send for MMM-PiLights and notifications shown in the default alert module. More will be added.
http://yourmagicmirror/Stripes/animation?name=rainbow&cycles=100000
http://yourmagicmirror/Stripes/animation?name=fill&color=blue
http://yourmagicmirror/Stripes/animation?name=pulse&color=red&cycles=4
http://yourmagicmirror/Stripes/animation/cancel
http://yourmagicmirror/Stripes/set?color=blue
http://yourmagicmirror/Stripes/set?color=rgb(25,200,200)
http://yourmagicmirror/Stripes/set?r=25&g=200&b=200
http://yourmagicmirror/Stripes/set?wheel=20
curl -X GET "http://yourmagicmirror/Stripes/animation?name=rainbow"