If you’re looking for a beginner-friendly, flexible way to add multiple user inputs to your Arduino projects, the Membrane Keypad 1x4 is a great option. In this tutorial, we’ll learn how to connect a 1x4 membrane keypad to an Arduino Uno and display button presses in the Serial Monitor using basic wiring and a simple Arduino sketch — no extra libraries needed!
![]() |
Membrane keypad 1x4 with Arduino |
๐ What is a Membrane Keypad 1x4?
A Membrane Keypad 1x4 is a compact, ultra-slim keypad featuring four individual keys in a single horizontal row. It works by closing a circuit when a key is pressed, making contact between conductive layers inside the membrane. This type of keypad is lightweight, reliable, and commonly used in home appliances, control panels, and DIY electronics.
๐ Membrane Keypad 1x4 Specifications
Here’s a quick overview of the module’s specifications:
![]() |
Membrane keypad 1x4 specifications |
Components Required
To get started, you will need the following components:
![]() |
Components required for this tutorial |
✅ Arduino UNO board
✅ Membrane Keypad 1x4
✅ Jumper Wires
✅ USB cable for Arduino
๐ ️ Circuit Wiring
Here’s how to wire the components correctly:
![]() |
Connection membrane keypad 1x4 |
![]() |
The connection between membrane keypad 1x4 and Arduino |
![]() |
Wiring diagram |
✅ Keypad Pin 1 → Arduino Pin GND
✅ Keypad Pin 2 → Arduino Pin 3
✅ Keypad Pin 3 → Arduino Pin 4
✅ Keypad Pin 4 → Arduino Pin 5
✅ Keypad Pin 5 → Arduino Pin 6
Programming the Arduino
Here’s a simple sketch to detect button presses and display them on the Serial Monitor or you can download the code HERE.
const int rowPins[4] = {2, 3, 4, 5}; //Digital Input char keyMap[4] = {'1', '2', '3', '4'}; //Keypad Number //connect Pin1 keypad to GND void setup() { Serial.begin(9600); for (int i = 0; i < 4; i++) { pinMode(rowPins[i], INPUT_PULLUP); } } void loop() { for (int i = 0; i < 4; i++) { if (digitalRead(rowPins[i]) == LOW) { Serial.print("Key Pressed: "); Serial.println(keyMap[i]); delay(300); } } }
![]() |
Open Arduino IDE and copy-paste the code |
๐งช Testing the GSM Module
After uploading the code to your Arduino, open the Serial Monitor in the Arduino IDE and press each button on the 1x4 keypad.
๐ Conclusion
That’s it — a simple, practical way to connect a Membrane Keypad 1x4 to an Arduino Uno and read inputs via the Serial Monitor. This setup is ideal for beginner projects like password entry systems, basic menu navigation, or digital counters.
๐ฆ Where to Buy
Shopee:
Lazada:
Aliexpress:
๐ฅ Watch the Full Video Tutorial
๐ If you found this guide helpful, share it with fellow makers! For more tutorials, subscribe to our YouTube channel and follow us on social media. ๐
#arduino #keypad #1x4keypad #membrane #diyprojects
No comments:
Post a Comment