Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manual buttons not working #67

Closed
chrgachrga opened this issue Dec 14, 2021 · 4 comments
Closed

manual buttons not working #67

chrgachrga opened this issue Dec 14, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@chrgachrga
Copy link

chrgachrga commented Dec 14, 2021

Hi,
I was checking on the new feature for physical buttons. My conf looks as follows:
GPIO_PIN_NEXT=5
GPIO_PIN_PREVIOUS=6
GPIO_PIN_PLAY=0
GPIO_ACTION_VALUE=0
SLIDESHOW_DELAY=10

If I now add a button between 3.3v and GPIO 5 or 6, nothing happens.
I am on a raspberry pi 2.
Setup is done according to this:
https://www.elektronik-kompendium.de/sites/raspberry-pi/2110081.htm

Can you confirm that the config and button is right? Or am I missing anything?

thanks,
chrga

@universalappfactory
Copy link

Hi,

I have prettry the same config and it works for me with a rasperry pi zero. Have you set GPIO_ACTION_VALUE according to your setup (pullup or pulldown resistor)?

And you may check this output in your console:
cat /sys/class/gpio/gpio6/value

there you should see if the button is pressed or not (press the button and run the command)

@universalappfactory
Copy link

Ah and I think there is an error in the is_gpio_pressed function.

if [ "$(cat /sys/class/gpio/gpio${GPIO_PIN_NEXT}/value)" -eq "${GPIO_ACTION_VALUE}" ]

should be

if [ "$(cat /sys/class/gpio/gpio${1}/value)" -eq "${GPIO_ACTION_VALUE}" ]

I think.

@avanc avanc added the bug Something isn't working label Dec 17, 2021
@avanc avanc self-assigned this Dec 17, 2021
@avanc
Copy link
Owner

avanc commented Dec 17, 2021

@universalappfactory Thanks for pointing that out.

@avanc avanc closed this as completed in 3fef2e2 Dec 27, 2021
@avanc
Copy link
Owner

avanc commented Dec 27, 2021

@chrgachrga I fixed the issue emntioned by @universalappfactory. However, I#M not sure if this is your issue, as something should happen also with the bug. Please reopen with additional information if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants