I am still learning about Circuitpython and I have trouble working with a keypad. So I have a Feather M4 Express board(FM4E) and (1x4) Matrix keypad. The (1x4) Matrix keypad has 5 pins where I think four pins are for the numbers on the keypad (1 till 4) and the fifth pin is connected to the power. (FM4E image, keypad image) So I connected all four pins to pin A0, A1, A2, and A3 on the FM4E board. I want to read the keys pressed on the keypad and I am unable to do so. I tried testing the keypad by using if statements and print the number if each button is pressed.
I noticed that it prints multiple times if press one button and sometimes it overlaps with the other keys. For example, I press '2' on the keypad, it prints '2' and'3'.
Is there a better approach to read the key once when the one button on the keypad is pressed?
Thanks! Much appreciated