Skip to content

Arduino uno + 4×4 Keypad Matrix + LCD i2c screen

Hello everyone, this is a quick tutorial on how to use the keypad with Arduino and a LCD i²c screen.

The Keypad I use is 4×4, it’s very useful and permits you to enter values or codes to you projects, I used it in many locks, alarm clocks, values input… It has 8 pins wired with Arduino Digital pins and the Matrix should be declared in the code, you’ll find examples in the Arduino Keypad built-in library.

The LCD I use is a i²c it has only 4 pins and easier than the standard version.

Wiring:

Keypad pins (from 8 to 1) it’s written on the kaypad, are wired with the Arduino UNO digital pins from (9 to 2).

LCD display is wired on 5v, GND, SDA with Analog4 and SCL with Analog5

Don’t forget to download the libraries if you don’t have them already, go to Arduino IDE, Sketch, Include libraries, Manage libraries, then search for the name of the library as in the code and install it.

The code I provided is just an example to get you started with both modules, but the possibilities are a lot bigger, you can check my other projects using the modules.

Library

You can download LCD i2c library here I use the New_Liquid_Crystal one.

Code:

Yassine View All

Automation and Electrical Engineer, Electronics amateur trying to share my little projects.

8 thoughts on “Arduino uno + 4×4 Keypad Matrix + LCD i2c screen Leave a comment

Leave a Reply

%d bloggers like this: