- On sale!
- -€0.60
Sealed Membrane 4x4 button pad with...
- On sale!
- -€2.00
Numeric Keypad 12 keys black
- On sale!
- -€2.00
On the following link you could find a good tutorial how to use a 4x4 matrix keypad.
If you have any questions on this product please feel free to contact us.
*Disclaimer: The images are merely illustrative.
The Arduino detects which button is pressed by detecting the row and column pin that’s connected to the button.
This happens in four steps:
1. First, when no buttons are pressed, all of the column pins are held HIGH, and all of the row pins are held LOW:
2. When a button is pressed, the column pin is pulled LOW since the current from the HIGH column flows to the LOW row pin:
3. The Arduino now knows which column the button is in, so now it just needs to find the row the button is in. It does this by switching each one of the row pins HIGH, and at the same time reading all of the column pins to detect which column pin returns to HIGH:
4. When the column pin goes HIGH again, the Arduino has found the row pin that is connected to the button:
From the diagram above, you can see that the combination of row 2 and column 2 could only mean that the number 5 button was pressed.
Related products