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-Buttons

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    5 Posts 3 Posters 1.7k 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.
    • J Offline
      Johans
      last edited by

      Hi, I wanted more pages on my mirror and control them physically with a button.
      installed MMM-Pages / MMM-Page Selector / MMM-Buttons and MMM-Remote Control.
      (First I tried to use MPR-121 but that gives too many errors during installation so I gave up)
      3 buttons connected to Pin 23-34-25 (BCM numbering - RPI-4/4GB)
      Now when I press a button nothing happens. Can’t see what could be wrong.
      this my config:

      {
          module: 'MMM-Buttons',
          config: {
              buttons: [
                  {
                      pin: 23,
                      name: "page changes",
                      longPress: {
                          notification: "PAGE_DECREMENT",
                          payload: {action: ""}
                      },
                      shortPress: {
                          notification: "PAGE_INCREMENT",
                          payload: {action: ""}
                      },
                  },
                  {
                      pin: 24,
                      name: "monitor_control",
                      longPress: {
                          notification: "REMOTE_ACTION",
                          payload: {action: "MONITOROFF"}
                      },
                      shortPress: {
                          notification: "REMOTE_ACTION",
                          payload: {action: "MONITORON"}
                      },
                  },
                  {
                      pin: 25,
                      name: "power",
                      longPress: {
                          title: "Power off",
                          message: "Keep pressed for 3 seconds to shut down",
                          imageFA: "power-off",
                          notification: "REMOTE_ACTION",
                          payload: {action: "SHUTDOWN"}
                      },
      		 shortPress: {
                          title: "test page up",
                          notification: "PAGE_INCREMENT",   // as test
                          payload: {action: "1"}            // as test
                      },
                  },
              ]
          }
      },
      
      J FoziF 2 Replies Last reply Reply Quote 0
      • J Offline
        Johans @Johans
        last edited by

        @johans - they are connected to ground or must the common be connected to the 3.3V pin?

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          JohnBachini @Johans
          last edited by

          @johans

          I just started doing exactly what you are trying to do. I have managed to get MMM-Buttons working with one button, but not getting reliable results.

          I first tried MMM-Button and was able to confirm button press worked as was getting a message in the logs saying the button was pressed.

          Correct ground and i thought the other needs to be one of the green GPIO, sorry not at home so cant check

          1 Reply Last reply Reply Quote 0
          • FoziF Offline
            Fozi Project Sponsor @Johans
            last edited by

            @johans I guess you need to use a pulldown resistor to avoid floating GND.
            Here is a sketch how to use the pull-down-resistor. I had the MMM-Button module installed in the past, but replaced with a gesture sensor (MMM-GorveGestures)
            MM_push_button.png

            HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              Johans @Fozi
              last edited by

              @fozi - Thanks will check if a resistor does the trick - if not I order a gesture sensor

              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