I'm trying to register a button, and it's saying I'm pressing it all the time - so I unplugged everything but the one wire coming off of the pins and it was still registering. .. even shows at touching when I just touch it with my finger.
Are the pins fried?
I'm using this:
Code: Select all
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(24, GPIO.IN)
count = 0
while True:
inputValue = GPIO.input(24)
if (inputValue == True):
count = count + 1
print("Button pressed " + str(count) + " times.")
time.sleep(.3)
time.sleep(.01)Any help is appreciated, I can't work it out.