I am building a simple application with a switch on the rasperry pi 3 b+. I have connected GPIO pin 18/32 through a 56k resistor to 3.3v (tried pin 1 and 17) to have it pulled up. The switch closes the GPIO to GND when pressed. This works fine so far.
I use it as follows:
GPIO.setup(23, GPIO.IN)
GPIO.add_event_detect(23, GPIO.FALLING, callback=btn, bouncetime=200)
However, when I trigger the light switch of the ROOM, it generates random inputs and calls the btn() callback.
I am not sure what is wrong. Did I realize the pull down correctly? Is it the wrong capacity?
I am not sure what is wrong
- neither are we, because we don't know what you DID. What ispin 18/32
? What is connected to what?