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?

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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