[How to do instruction] Use hardware momentary switches to control moOde - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: FAQ and Guides (https://moodeaudio.org/forum/forumdisplay.php?fid=9) +--- Thread: [How to do instruction] Use hardware momentary switches to control moOde (/showthread.php?tid=198) |
RE: Use hardware momentary switches to control moOde - mothinos - 03-25-2019 hello, Thank you for this code lines! I'm very intressed in this feature because I use to use Volumio with the HWbuttons plugin and I've discovered moode 5 beta. I want to moove to moode! I'm trying to configure my Pi from your script, but I have a little problem: - when I use "low" GPIO pin with 3.3v pins there is no reaction. do this script only works with high GPIO or is there a way to use the low ones and if it's possible what line must I modify? I want to use a 3.5 tft screen and I only can use the 27 to 40 pins in order to plug the screen. Thanks Mothinos RE: Use hardware momentary switches to control moOde - Tim Curtis - 03-25-2019 It would be easy enough to make a config screen for this. Is this the complete source code for the feature? Code: #!/usr/bin/python -Tim RE: Use hardware momentary switches to control moOde - remy1961 - 03-25-2019 (03-25-2019, 01:20 PM)mothinos Wrote: hello,Hi, May be Kent a.k.a. theoldpresbyope can answer that question. He is the one who helped with the script. I am sure he will read this and try to help. Remy RE: Use hardware momentary switches to control moOde - TheOldPresbyope - 03-26-2019 (03-25-2019, 01:20 PM)mothinos Wrote: ... Hi, @mothinos First, let's make sure I understand your question. When interfacing to the GPIO, "low" and "high" usually refer to the state of the pin, with low being 0V and high 3V3, e.g., "low" and "high" refer to the voltage on the pin. Is this what you mean or are you referring to the GPIO pin number itself? Regards, Kent RE: Use hardware momentary switches to control moOde - Tim Curtis - 03-26-2019 Try @Cyanoazimin script from post #9 :-) RE: Use hardware momentary switches to control moOde - Tim Curtis - 03-26-2019 Hi, Here is screenie of new GPIO Config feature :-) The underlying code can be easily extended to support other actions. This interfaces with a modified version of @Cyanoazimin's nice script from post #9. [attachment=568] I'll need some volunteers to test this out because I'm w/o any hardware that has GPIO controlled buttons. -Tim RE: Use hardware momentary switches to control moOde - DRONE7 - 03-26-2019 (03-26-2019, 10:53 PM)Tim Curtis Wrote: Hi, Tim, from the 1st post... Quote:On the hardware side, you set your hardware button to connect the ground pin of your RPi with a GPIO pin of your choice.So you should be able to strip the ends of a couple of dupont cables, connect the plug ends to ground and selected pin then briefly touch the bare ends together. Happy to test it here... RE: Use hardware momentary switches to control moOde - cyoops - 03-27-2019 (03-26-2019, 10:53 PM)Tim Curtis Wrote: Hi, Cool, that's great, but I think I think Random, Single, Power off/on are much more useful than playlist, especially the powerbutton. Moode with buttons and pydPiper, that's a perfect local player. RE: Use hardware momentary switches to control moOde - remy1961 - 03-27-2019 (03-26-2019, 11:41 PM)DRONE7 Wrote:Quote:On the hardware side, you set your hardware button to connect the ground pin of your RPi with a GPIO pin of your choice.So you should be able to strip the ends of a couple of dupont cables, connect the plug ends to ground and selected pin then briefly touch the bare ends together. Hi. As explained here it actually depends on the "default pull status" of the GPIO: if the default pull status is low, you connect the gpio to the 3.3 volts pin (never connect with the 5 volts pin). If the default status is high, you connect to the ground. Remy RE: Use hardware momentary switches to control moOde - DRONE7 - 03-27-2019 Thanks for that Remy... that's much clearer ! |