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 2.0k 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.
    • SpicyCodingS Offline
      SpicyCoding
      last edited by

      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

      bheplerB N 2 Replies Last reply Reply Quote 0
      • bheplerB Offline
        bhepler Module Developer @SpicyCoding
        last edited by

        @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

          @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

            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

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 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