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

Buttons don't work until I test from terminal #20

Open
gonzonia opened this issue Jul 10, 2023 · 4 comments
Open

Buttons don't work until I test from terminal #20

gonzonia opened this issue Jul 10, 2023 · 4 comments

Comments

@gonzonia
Copy link

gonzonia commented Jul 10, 2023

The plugin works fine for what I'm doing but in order for it to work I have to run a python based test program I have for testing the buttons. Once I do that it all works great. I have to do this every time the pi is rebooted. Any ideas?

@gonzonia
Copy link
Author

gonzonia commented Jul 10, 2023

This is the python test program

import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)

GPIO.setup(25, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(24, GPIO.IN, pull_up_down=GPIO.PUD_UP)


while True:
    input_state25 = GPIO.input(25)
    input_state24 = GPIO.input(24)
    if input_state25 == False:
        print('Button Pressed 25')
        time.sleep(0.2)
    if input_state24 == False:
        print('Button Pressed 24')
        time.sleep(0.2)

@gonzonia
Copy link
Author

I don't even have to press a button, just load that and then quit and the buttons start working.

@faspina
Copy link

faspina commented Dec 31, 2023

I can only get PIN 21 to work

@DocDrydenn
Copy link

Same here. Ugh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants