Header Ads

How to Use a Custom Keypad for Arduino

In this tutorial, I’ll show you how to setup a 3X4 keypad on the Arduino. First I’ll explain how the Arduino detects key presses, then I’ll show you how to find the pinout of any keypad. As a simple example, I’ll show you how to print out the key presses on the LCD.

The buttons on a keypad are arranged in rows and columns. A 3X4 keypad has 4 rows and 3 columns.
Beneath each key is a membrane switch. Each switch in a row is connected to the other switches in the row by a conductive trace underneath the pad. Each switch in a column is connected the same way – one side of the switch is connected to all of the other switches in that column by a conductive trace. Each row and column is brought out to a single pin, for a total of 7 pins on a 3X4 keypad.

Connection details:

The pin connection for 3X4 keypads will look like this



 

Parts required:

  1. Arduino board
  2. 3X4 Keypad
  3. 16X2 LCD display with I2C interface
  4. Jumper wires

Code:

Once everything is connected, upload this code to the Arduino:

Downloads

I2C Library
Keypad Library

Output:

see the below example output picture.

12 comments:

  1. Replies
    1. You are welcome, need like this support to improve the website

      Delete
  2. Thanks for sharing your valuable information to us, its very useful to me, Keep on doing it, waiting for next update form you!!!

    AWS Training in Chennai
    Blue Prism Training in Chennai

    ReplyDelete
  3. awesome blog it's very nice and useful i got many more information it's really nice i like your blog styleweb design company in velachery

    ReplyDelete

  4. its really informative and innovative keep us posted with new updates. its was really valuable.thanks a lot. apple laptop

    ReplyDelete

Powered by Blogger.