Tuesday, November 24, 2015

How to use a Keypad - Arduino Tutorial

We are known very well about Keypad which is the combinations of buttons arranged in manner like a block or pad. A keypad usually had digits, symbols and the set of alphabetical letters. If we using mostly numbers then this keypad is called Numeric keypad. Keypads can be found in many alphanumeric keyboards and other devices such as calculators, push-button telephones, combination locks, and digital door locks, which require mainly numeric input.

Alphanumeric Arduino Keypad

Step 1: What you will need

Alphanumeric Arduino Keypad

You will need:
Step 2: The Circuit

We are using 7 pins keypad with 3 columns and 4 rows.

Alphanumeric Arduino Keypad

Note:

If your system does not work properly you can change the connections in the next step and pin no in the commands Search the web for additional help or find the datasheet for your keypad.

Byte row Pins[ROWS] = {7, 2, 3, 5}; //connect to the row pinouts of the keypad
Byte column Pins[COLS] = {6, 8, 4}; //connect to the column pinouts of the keypad

Step 3: Code

Alphanumeric Arduino Keypad

Here's the code, embedded using codebender!
The keypad that we are using has 4 rows and 3 columns:
const byte rows = 4; //four rows
const byte cols = 3; //three columns
char keys[rows][cols] =
{ {'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'#','0','*'} };
Tip: If you have another set of keypad you can change those values with yours ;)

Step 4: Good Work

Alphanumeric Arduino Keypad

In this system we can learn about Arduino and how to use a keypad with arduino.

No comments:

Post a Comment