Quantcast
Viewing all articles
Browse latest Browse all 4860

Graphics, sound and multimedia • Re: MoOde audio: GPIO button only works after setting it to pull down manually

That didn't do the trick, unfortunately.

But I did find a solution. The "problem" is that GPIO pins are always configured as pull-up in the software. This is also clearly stated in point 3 on the GPIO control configuration page Image may be NSFW.
Clik here to view.
:roll:


So I changed line 59 in /var/www/daemon/gpio_buttons.py from

Code:

GPIO.setup(sw_1_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
to

Code:

GPIO.setup(sw_1_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
Now that I have the solution, I think I remember having the same problem a couple of years ago, but I just forgot how to fix it. Anyway, it would be nicer to be able to do this on the config page, because I have the change the source code after every update, which I just forget to do, apparently...

Statistics: Posted by ralphenstein — Mon Apr 22, 2024 7:35 pm



Viewing all articles
Browse latest Browse all 4860

Trending Articles