# 4x3 Button matrix keypad

**Type:** Product page · **SKU:** CE09447 · **Brand:** [Core Electronics](https://core-electronics.com.au/brands/core-electronics-australia)
**Page:** https://core-electronics.com.au/4x3-button-matrix-keypad.html ([markdown](https://core-electronics.com.au/4x3-button-matrix-keypad.html.md))

Maximize your input possibilities with our 4x3 Button Matrix Keypad! Featuring numeric, star, and hash keys, this versatile keypad conserves IO while adding functionality to any project. Perfect for Makers looking to streamline their designs.

## Pricing

- **Price:** $5.80 (inc GST) — $5.27 AUD, exc GST
- **Quantity discounts:** 5+ $5.16 (exc GST) · 15+ $5.01 (exc GST)

## Availability & dispatch

- In stock, ships same business day if ordered before 2PM (Australia/Sydney).
- We can dispatch 21 today; more stock is typically available with a 8–12 day lead time.

## Description

Add lots of buttons with few IO, grab this numerical keypad (with star and hash keys), and add it to your next project!

The output of the keypad is handled with a 3-column, 4-row matrix output, scanning for shorts between the two to determine which button is pressed.

### Features

- Same layout as a phone keypad, make it your own with tape and markers!
- M2 Mounting holes (46mm x 59mm)
 
### Specifications

- Dimensions: 51mm x 69mm x 10mm

### Examples

#### Raspberry Pi Pico - Micropython

 ```
from machine import Pin
import utime

# Defining the GPIO connected to keypad rows and columns (ordering important)
row_list = [10, 15, 14, 12]  
col_list = [11, 9, 13]

for x in range(0, 4):
  row_list[x] = Pin(row_list[x], Pin.OUT)
  row_list[x].value(1)

for x in range(0 ,3):
  col_list[x] = Pin(col_list[x], Pin.IN, Pin.PULL_UP)

# Define the symbol associated with each key
key_list = [["1", "2", "3"],\
      ["4", "5", "6"],\
      ["7", "8", "9"],\
      ["*", "0", "#"]]

# Scan the keypad to detect keypresses
def keypad(col, row):
  for r in row:
    r.value(0)
    result = [col[0].value(), col[1].value(), col[2].value()]
    if min(result) == 0:
      key = key_list[int(row.index(r))][int(result.index(0))]
      r.value(1)
      return (key)
    r.value(1)

while True:
  key = keypad(col_list, row_list)
  if key != None:
    print("key: "+key)
    utime.sleep(0.3)
```

## Images

- [Product image 1](https://core-electronics.com.au/media/catalog/product/k/e/keypad.jpg)
