4x4 Matrix Keyboard Keypad [S188]
https://www.youtube.com/watch?v=YU6Nc10mqug
*GitHub : https://github.com/rdiot/rdiot-s188.git
* Specs
Small and compact in size
MR-MINI-4x4KEY is a 4x4 matrix keyboard module. It has 8 pins and 10 number 4 Letters on the interface
8-PIN MRconnect hole
+3.0V to +5VDC supply voltage
On-board pulled-up resistors
Four mounting holes on each corner
Dimension:7cm*6.5cm*0.5cm( approx)
* Contents
byte colPins[numRows] = {2,3,4,5}; //col 0 to 3
byte rowPins[numCols]= {6,7,8,9}; //row 0 to 3
- Connect
1(LEFT) ----- D2
2 ----- D3
3 ----- D4
4 ----- D5
5 ----- D6
6 ----- D7
7 ----- D8
8(RIGHT) ----- D9
- Key Code
const byte numRows= 4; //number of rows on the keypad
const byte numCols= 4; //number of columns on the keypad
//keymap defines the key pressed according to the row and columns just as appears on the keypad
char keymap[numRows][numCols]=
{
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte colPins[numRows] = {2,3,4,5}; //col 0 to 3
byte rowPins[numCols]= {6,7,8,9}; //row 0 to 3
char keypressed = myKeypad.getKey();
switch (keypressed)
{
case '1':
lcd.print("keypressed=" + (String)keypressed + " ");
break;
}
'2) Sensor > Keypad' 카테고리의 다른 글
4x3 Matrix 12 Key Membrane Switch Keypad [S228] (0) | 2016.12.13 |
---|---|
4x5 Matrix Array 20 Keypad [S187] (0) | 2016.09.12 |
TTP229 16 Key Capacitive Touch Keypad (TTP229) [S153] (0) | 2016.09.12 |
4x4 Matrix Keyboard 16 Key Membrane Switch Keypad [S087] (0) | 2016.09.12 |
4x4 Matrix 16 Keypad Keyboard Module [S025] (0) | 2016.09.12 |