Skip to content

Simplest Arduino Lock/unlock code/algorithm using Keypad and LCD screen

 

Hello,

This post is about an Arduino locking algorithm/code you can add to your own projects, the code is very simple to use and understand by beginners, the code here is used to show a message on the LCD screen if the code is correct or not, you can add it to your own projects, with servo locks or relays or whatever you are using.

Check my other tutorial about LCD i2c screen if you don’t know how to use it yet:

Arduino LCD I2C simple use and direct write from serial monitor



Wiring:

The wiring is easy the Keypad pins are from 2 to 9 digital pins, the LCD I use is a i2c version, it has 4 pins GND/VCC/SDA/SCL are wired respectively with GND/5V/A4/A5.

Later you can add a relay, solenoid or adapt an electronic lock and integrate this algorithm.

Library:

There’s already a built-in library for the keypad all you need is a library for the I2C LCD screen, you can download it here. We’re using new liquid crystal library, there are others, just make sure to adapt the code and have multiple libraries with the same name.



Code:

Yassine View All

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

2 thoughts on “Simplest Arduino Lock/unlock code/algorithm using Keypad and LCD screen Leave a comment

Leave a Reply

Discover more from SURTR TECHNOLOGY

Subscribe now to keep reading and get access to the full archive.

Continue reading