Contents keypad
A. What is keypad?
B. Hardware Required
C. steps
D. task
E.References
A. What is keypad?
Keypad is asset of buttons arranged in rows and columns, each
buttons is called key
Keypad has various types. Two popular types for DIY projects
are Keypad 3*4 (12keys) and Keypad 4*4(16keys)
B. Hardware Required
Arduino Uno
Keypad
Terminal monitor
wires
C. steps
1.
2.
3.virtulterminal
4. Put all component
5. Let’s connect
1, 2, 3>13, 12, 11
A, B, C>10, 9, 8, 7
6.0,1>serial monitor
7. Arduino Uno(from file >preferences >check compile)
8. File >new sketch>put code in it
#include <Keypad.h>
const uint8_t ROWS = 4;
const uint8_t COLS = 3;
char keys[ROWS][COLS] = {
{ '1', '2', '3' },
{ '4', '5', '6' },
{ '7', '8', '9' },
{ '*', '0', '#'}
};
uint8_t rowPins[ROWS] = { 10, 9, 8, 7 }; // Pins
connected to row of keypod
uint8_t colPins[COLS] = { 13, 12, 11 }; // Pins
connected to col
Keypad keypad = Keypad(makeKeymap(keys), rowPins,
colPins, ROWS, COLS);
void setup() {
Serial.begin(9600);
}
void loop() {
char key = keypad.getKey();
if (key != NO_KEY) {
Serial.println(key);
}
}
9. If not working keypad library go to download it from
https://github.com/Chris--A/Keypad
Then from sketch >include library >add zip
10.
Then put code in ard in proteus
Output
D. task choose one from
1.Try to make these steps but use 4*4 keypad after install
library of it
2.replace serial monitor with lcd on above
E.References
https://www.youtube.com/watch?v=Ab97a35zytc
https://www.youtube.com/watch?v=Z0CQltwEQGQ
https://arduinogetstarted.com/tutorials/arduino-keypad