1

I have a button in a working circuit. Within sys/class/gpio/gpio24, value changes properly (it becomes 1 when pressed down, 0 otherwise).

When I use GPIO.setup(24, GPIO.IN) within python, GPIO.input(24) rapidly changes between 0 and 1 without the button being touched at all.

The really strange thing is, that after I run this program, when I go back to sys/class/gpio/gpio24, value now reflects that same issue. It changes back and forth between 0 and 1 without the button being pressed.

What could be the issue? What can I do to have GPIO.input(24) act normally?

1 Answer 1

1

Turns out I didn't have my circuit connected to the ground properly. Don't know why that would cause such an issue though.

1
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Feb 26, 2020 at 21:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.