I'm having a rather funny issue with GPIO & tactile switch.
The issue is as I understand purely electric.
My RPi is connected to a cheap usb "Extreme Style 5V 3.1A" PSU.
Same power outlet is occupied by a 8+ y/o fridge. What I'm experiencing is a false "button push" every time the fridge compressor kicks in, turns off or "changes gear", so there is as I understand some electrical interference.
What would be a correct way to prevent "electrical noise" from pushing my buttons?
Briefly, code I'm using:
GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) (...) GPIO.wait_for_edge(pin, GPIO.FALLING)