4x3 Matrix 12 Key Membrane Switch Keypad [S228]
https://www.youtube.com/watch?v=15Asj5XZBlg
* Specs
Pad Size: 69.2 x 76.9 x 0.8mm
Cable Length: 3-1/3" or 86mm (include connector)
Connector: Dupont 7 pins, 0.1" (2.54mm) Pitch
Mount Style: Self-Adherence
Max. Circuit Rating: 35VDC, 100mA
Insulation Spec.: 100M Ohm, 100V
Dielectric Withstand: 250VRms (60Hz, 1min)
Contact Bounce: <=5ms
Life Expectancy: 1 million closures
Operation Temperature: -20 to +40 °C
Package:
1PCS X4 x 3 Matrix Array 12 Key Membrane Switch Keypad Keyboard
* Contents
- LIbrary : http://playground.arduino.cc/uploads/Code/keypad.zip
- Connect
7 ----- D9
6 ----- D8
5 ----- D7
4 ----- D6
3 ----- D5
2 ----- D4
1 ----- D3
- Key Code
#include <Keypad.h>
const byte ROWS = 4; //four rows
const byte COLS = 3; //four columns
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'}
};
byte rowPins[ROWS] = {9, 8, 7, 6}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {5, 4, 3}; //connect to the column pinouts of the keypad
//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);
void setup(){
Serial.begin(9600);
}
void loop(){
char customKey = customKeypad.getKey();
if (customKey){
Serial.println(customKey);
}
}
'2) Sensor > Keypad' 카테고리의 다른 글
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 Keypad [S188] (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 |