Code Monkey home page Code Monkey logo

mmm-stripes's Introduction

MMM-Stripes

MagicMirror module to control a led strip attached to a Raspberry Pi.

Requirements

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.

Module installation

Cloning the module and installing the dependencies

cd ~/MagicMirror/modules
git clone https://github.com/paviro/MMM-Stripes.git
sudo apt-get install scons
cd MMM-Stripes
npm install

Add the module to MM

Open 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
        }
    }
]

Module Configuration Options

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.

Trigger from another module

Currently supports messages send for MMM-PiLights and notifications shown in the default alert module. More will be added.

API Endpoint

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 Example

curl -X GET "http://yourmagicmirror/Stripes/animation?name=rainbow"

mmm-stripes's People

Contributors

paviro avatar

Stargazers

 avatar

Watchers

 avatar

mmm-stripes's Issues

not really an error rather a question

how does that have to be connected?

somehow the program tells me with curl that he starts rainbow for example

but it does not happen I've connected with gnd af rpi and din with gpio 18

and electricity, of course, in a power supply but it does not work :(

How does it work?

  1. I cloned the repository, connected the neopixel to gpio18, added the module to config.js. Next what? how to make the leds light up. The curl command and the http command executes but the led's dont light up.
  2. What needs to be done to make it work with PIR-motion sensor. Please guide.
    Thanks

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.