• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM sensor+WS2812b and MM CONFIG RESET button

Scheduled Pinned Locked Moved System
4 Posts 3 Posters 1.3k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    Serge
    last edited by Serge Mar 8, 2020, 1:21 PM Oct 26, 2019, 5:33 PM

    This app was made to add some kind functionality to Magicmirrors run on RPis.

    App allows you to:

    • control LED strip by sensor and also
    • rreset MagicMirror’s config.js file with a hardware button connected to Raspberry (so config should be set to default values). The operation will be confirmed by three red light blinks.
      Here is short video (press on pic)
      Raspberry

    Installation

    1. Download and install the latest ws2812b library to your Raspberry:
    • sudo pip install rpi-ws281x
    1. Clone the repository : git clone https://github.com/sergge1/MMM-senorled
    2. Enter the repository: cd MMM-senorled/
    3. Edit parameters in configuration section of the *.py file: numbers of LED and GPIO pins
      5 Run the app with: sudo python sensorbtnled.py

    Hardware used:

    LED strip WS2812b https://www.aliexpress.com/item/32820628563.html

    Buttons https://www.aliexpress.com/item/33060639491.html

    Movement sensor RCWL-0516 https://www.aliexpress.com/item/32816228153.html

    Option Description
    SHUTOFF_DELAY Delay in seconds for sensor state change, e,g, how long the LED will light after no movement detected. The default value is 5.
    PIR_PIN GPIO pin number to which the sensor is connected. The default value is 11.
    LED_COUNT Number of LEDs connected to the strip. The default value is 160.
    LED_PIN GPIO pin number to which the LED data line is connected. The default value is 21
    LED_BRIGHTNESS Britness of LED lights. 0 is no light, 255 is the maximum brightness. The default value is 255.
    copy [] set of files which should be rewritten. The default value is ['/home/pi/MagicMirror/config/config.js.sample', '/home/pi/MagicMirror/config/config.js.sample'].
    writePin GPIO pin to which hardware button is conected (Other button pin is connected to any GND. The default value is 3.

    and here is description and GIT
    [card:sergge1/MMM-senorled]

    Any ideas and comments are appreciated.
    As well as your direct pull requests to the project on the github page.

    1 Reply Last reply Reply Quote 1
    • B Offline
      Bouba830
      last edited by Apr 1, 2020, 12:22 PM

      Hello, I am very interested in your project, I would like to know if it is possible to have more details, I am a beginner 😁.
      Is it possible to know the connection?
      Is the switch just a push button or a stop market button?
      thank you so much
      I love what you did.

      1 Reply Last reply Reply Quote 0
      • B Offline
        Bouba830
        last edited by Mar 18, 2021, 5:10 PM

        hello, I no longer have access to the installation of your module, do you know why?
        thank you

        S 1 Reply Last reply Mar 18, 2021, 6:24 PM Reply Quote 0
        • S Offline
          sdetweil @Bouba830
          last edited by Mar 18, 2021, 6:24 PM

          @bouba830 ok, I see…

          https://github.com/sergge1/MMM-senorled is no longer available

          looks like it has been withdrawn

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Sam, technical setup by Karsten.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy