• 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.

Need Guidence, Or Someone To Make A Module For Me, Uses GPIO

Scheduled Pinned Locked Moved Requests
4 Posts 4 Posters 1.8k Views 3 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
    SpicyCoding
    last edited by Jan 24, 2018, 2:16 AM

    Hello All!

    My name is Anthony, AKA Spicy Jelly. I am a High School Student in the US, with little knowledge in Python, C+, and JavaScript. My idea for a module was displaying a local image as a background. I know this has already been done, but I wanted to put my own twist on it. My plan was to use a Piezo element, as a input for vibrations, from me knocking on the wall, using the RPi’s GPIO pins. When the element detected a vibration input, the local image background would fade, and the mirror would reappear. I would want the other elements to be displayed when both background, and mirror.

    ~ I have no clue where to start, so if someone would be interested in making this for me, or guiding me in making it, it would be greatly appreciated

    • Feel free to contact me

    Thank you in advance

    -Anthony

    B N 2 Replies Last reply Jan 25, 2018, 7:44 PM Reply Quote 0
    • B Offline
      bhepler Module Developer @SpicyCoding
      last edited by Jan 25, 2018, 7:44 PM

      @SpicyCoding It’s not nearly as much fun if someone makes it for you.

      This might get you started: https://www.youtube.com/watch?v=0PAl340SCAY

      Once you can successfully detect a vibration/knock in your Python script, it should be pretty easy to use that code in a node_helper.js to send messages to an image module.

      1 Reply Last reply Reply Quote 0
      • N Offline
        ninjabreadman @SpicyCoding
        last edited by Jan 26, 2018, 12:51 AM

        @SpicyCoding

        For the coding part, you might consider using CSS to create your transparency:

        .module .knockknock {
          background: url("img_tree.jpg") no-repeat fixed center;
          opacity: 1.0;
        }
        

        Then for each knock, it could then increment opacity by 0.1. If you wanted to keep the other modules visible, you can position a separate element over the other modules. You could then have a timer running that after X amount of time the opacity resets to 1.0. (Or you can increment the opacity of the body and reset the opacity of all child elements/modules to 1.0.)

        You can also get fancier and use CSS animations to create transitions between each step, and to make it reappear, but best to get a proof-of-concept first.

        Problem with config or JavaScript? Copy/paste it into JSHint.
        Check out the detailed walkthroughs on install, config, modules, etc.

        1 Reply Last reply Reply Quote 0
        • D Offline
          doubleT Module Developer
          last edited by Jan 26, 2018, 10:48 PM

          Maybe you saw this thread. I made a module for duedahlb that shows a full size image when the module MMM-Button registers a button press. I think that could be a good start to study and maybe reverse engineer some parts from both modules.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          1 / 1
          • First post
            1/4
            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