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 to change pages

    Scheduled Pinned Locked Moved Solved Troubleshooting
    7 Posts 3 Posters 368 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
      Jimmy1502
      last edited by

      Hi, i wanna use a physical button to change the pages. Is this right?

      {
                              module: 'MMM-Buttons',
                              config: {
                                      buttons: [
                                              {
                                              pin: 26,
                                              name: "naechsteSeite",
                                              shortPress: {
                                                      notification: "PAGE_INCREMENT",
                                                      payload: 1,
                                                      },
                                              shortPress: undefined
                                              }
                                              ]
                                      }
                      },
      
      
      S 1 Reply Last reply Reply Quote 0
      • J Offline
        Jimmy1502 @sdetweil
        last edited by

        @sdetweil Thx for your help! Kinda dumb mistake :(

        But here for the rest. This code was working:

        {
                                module: 'MMM-Buttons',
                                config: {
                                        buttons: [
                                                {
                                                pin: 26,
                                                name: "nextpagewithbutton",
                                                shortPress: {
                                                        notification: "PAGE_INCREMENT",
                                                        payload: 1,
                                                        },
                                                }
                                                ]
                                        }
                        },
        
        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @Jimmy1502
          last edited by

          @Jimmy1502 said in MMM-Buttons to change pages:

                                              shortPress: {
                                                      notification: "PAGE_INCREMENT",
                                                      payload: 1,
                                                      },
                                              shortPress: undefined
          

          because you have shortPress defined twice, the last occurance wins…
          but other than that, looks on

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          J 1 Reply Last reply Reply Quote 0
          • J Offline
            Jimmy1502 @sdetweil
            last edited by

            @sdetweil Thx for your help! Kinda dumb mistake :(

            But here for the rest. This code was working:

            {
                                    module: 'MMM-Buttons',
                                    config: {
                                            buttons: [
                                                    {
                                                    pin: 26,
                                                    name: "nextpagewithbutton",
                                                    shortPress: {
                                                            notification: "PAGE_INCREMENT",
                                                            payload: 1,
                                                            },
                                                    }
                                                    ]
                                            }
                            },
            
            1 Reply Last reply Reply Quote 0
            • J Jimmy1502 has marked this topic as solved on
            • C Offline
              captheavenger
              last edited by

              can i ask what kind of buttons/wiring you used? did you use a breadboard or just go straight to the pins?

              My coding and modules are done so i’m at the “physical” point
              thanks

              J 1 Reply Last reply Reply Quote 0
              • J Offline
                Jimmy1502 @captheavenger
                last edited by

                @captheavenger hi i just used a wire (with special connectors) to directly connect the 3.3V pin to the other gpio pin. It was just for testing purpose. I bought a button but i need to solder wires to it.

                C 1 Reply Last reply Reply Quote 0
                • C Offline
                  captheavenger @Jimmy1502
                  last edited by

                  @Jimmy1502
                  gotcha, so i’m going to purchase a couple of 30mm arcade buttons to put on the side of the frame. my question is what type of wire would you recommend to connect the button to the pi?
                  i’m not sure of the terminology of how to describe the connectors. so when you say special connectors i think thats the info i’m missing
                  thanks!

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @captheavenger
                    last edited by

                    @captheavenger they sell wires with the GPIO pin sockets, the other end could be male or female, just clip that off and extend with anything…

                    I have a spool of 20ga wire…

                    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