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-Navigate, Navigation inside MagicMirror with Rotary Encoder

    Scheduled Pinned Locked Moved System
    45 Posts 6 Posters 21.2k Views 5 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.
    • E Offline
      Eisblume
      last edited by

      Hi,
      yes Pin 19, like you suggested. Everything else works fine, only the press action doesn’t work.
      MMM-Remote-Control is installed.
      I ordered a new Rotary Encoder, maybe this one I use has a defect .
      Eisblume

      1 Reply Last reply Reply Quote 0
      • A Offline
        AxLed Module Developer
        last edited by

        @Eisblume
        You can also try to put clockwise or counterclockwise signal on pin 19 for testing, so cw or ccw should send the press command. So you can make sure if press switch of your rotary encoder is bad.
        AxLED

        1 Reply Last reply Reply Quote 0
        • E Offline
          Eisblume
          last edited by

          Thx for support !!

          I will try and report !!

          1 Reply Last reply Reply Quote 0
          • E Offline
            Eisblume
            last edited by

            @AxLED
            I bought some new Rotary Encoders and with each one i had the same result. No press result will send, when i press the button :-( !

            But when i put cw or cww on pin 19, the press signal will send when i turn cw or cww.

            I tried other Pins for the press Signal, but it also doesn´t work.

            I am confused…! Any ideas what i can try to solve my Problem?

            Greets
            Eisblume

            1 Reply Last reply Reply Quote 0
            • A Offline
              AxLed Module Developer
              last edited by

              @Eisblume
              So the pin is correct. Some ideas.
              Press contains two operations, pressing and release. Did you try press and release in different speeds?
              How long are your cables between rotary and pi? Could also be a debouncing problem. Which pi are you using? (I tested the module on pi 1 and pi 3).
              AxLED

              1 Reply Last reply Reply Quote 0
              • E Offline
                Eisblume
                last edited by

                @AxLed
                I use a Raspberry Pi 3 b+. The F2F cables between the rotary and the pi are 20cm long.
                I tried different speeds for pressing and releasing.

                When i debug the code, no action arrives when i press the button.

                Is it possible that there are problem with other modules I use ??

                Eisblume

                1 Reply Last reply Reply Quote 0
                • A Offline
                  AxLed Module Developer
                  last edited by

                  @Eisblume
                  Conflicts with other modules are possible, but i dont think so, because press on cw/ccw works. You can try to change debounce time in node helper (i think, i am not sure about as i am on the road right now). I will check for the final line in node helper and let you know if i am in front of my computer.
                  AxLED

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    AxLed Module Developer
                    last edited by

                    @Eisblume
                    I found the line in node_helper.js, its line 35

                    const C = new Gpio(self.config.GPIOPins[2], 'in', 'both',{debounceTimeout : 20 }); //BCM Pin 19
                    

                    Here you can try to increase/reduce the debounceTimeout between 10 and 50 (in steps of 10) and see if there is a difference for your “pressed” problem.

                    AxLED

                    1 Reply Last reply Reply Quote 0
                    • E Offline
                      Eisblume
                      last edited by Eisblume

                      @AxLed
                      I tried every very with different press speed. It doesn’t work. No press Signal will be sent :-(

                      I don´t understand why cw and cww works fine, but not the press - Button?

                      Edit:
                      I test the Rotary with this: https://github.com/martinohanlon/KY040
                      Here the press button works fine.

                      pi@raspberrypi:~/EncoderTest/KY040/examples $ python python3.py
                      turned - 0
                      turned - 0
                      turned - 1
                      turned - 1
                      button pressed
                      button pressed
                      button pressed
                      button pressed
                      button pressed
                      button pressed

                      1 Reply Last reply Reply Quote 0
                      • A Offline
                        AxLed Module Developer
                        last edited by

                        @Eisblume
                        Please post your config and make sure your private keys are x-ed. So i can try to copy your setup to my test pi and maybe find out whats the reason. That your rotary encoder generally works is good to know.
                        AxLED

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 2 / 5
                        • 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