Read the statement by Michael Teeuw here.
MMM-Navigate, Navigation inside MagicMirror with Rotary Encoder
-
@Eisblume
Did you use the right Pin (either in config or on the pi) for the ‘press’ signal of the rotary encoder?
Is the module MMM-Remote-Control installed and working?
AxLED -
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 -
@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 -
Thx for support !!
I will try and report !!
-
@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 -
@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 -
@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
-
@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 -
@Eisblume
I found the line in node_helper.js, its line 35const 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
-
@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