I want to register button presses via a Python program I wrote with a Raspberry Pi 3. My buttons are connected both connected to ground and GPIO pins 22 and 27. However, when the buttons are pressed, it isn't giving a constant True but it changes really fast, so I get something like 'True, False, True, True, False, False, False, True, True' when it should be all true.
When the button isn't pressed however, it gives a constant false. I have checked all wires and tried it with and without resistors (10k and 4.7k), but they give the same result.
Is there any way to get this problem fixed? I also tried it with different switches, but they all give the same result. They are wires up with standard jumper wires.