#trending #viral
Welcome to "My Technical Support," where we dive into the world of DIY creations! Get ready to transform your space with our DIY decorations. Whether you're looking to craft a giant spider to give your home a spine-tingling touch or conjure up otherworldly ,we've got you covered.
Learn how to build a Password-Based Door Lock System using a Keypad and Arduino Mega! This DIY security project uses a 4x4 keypad, servo motor, and Arduino to create a reliable electronic door lock. Ideal for beginners and electronics students, this video covers circuit setup, code explanation, and working demo.
What you'll learn:
Interfacing 4x4 Keypad with Arduino Mega
Controlling a servo motor for locking/unlocking
Setting and changing passwords
How to secure your home or locker using Arduino
Complete wiring and working explanation
Components Used:
Arduino uno
4x4 Matrix Keypad
solenoid lock
16x2 LCD Display
Breadboard & Jumper Wires
Arduino code:
1st compile this code and send it to Arduino
#include EEPROM.h
void setup(){
}
void loop(){
EEPROM.write(0, '3');
EEPROM.write(1, '3');
EEPROM.write(2, '4');
EEPROM.write(3, '4');
}
then compile it and send to Arduino
#include Keypad.h
#include LiquidCrystal.h
#include EEPROM.h
LiquidCrystal lcd(A0,A1,A2,A3,A4,A5);
char d,d1,d2,d3,d10,d11,d12,d13;
int c,cpa;
bool cp,np;
const byte ROWS = 4; //four rows
const byte COLS = 4; //three columns
char keys[ROWS][COLS] = {
{'1','2','3','A'},
{'4','5','6','B'},
{'7','8','9','C'},
{'*','0','#','D'}
};
byte rowPins[ROWS] = {2,3,4,5}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {6,7,8,9}; //connect to the column pinouts of the keypad
Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
void setup(){
pinMode(10,OUTPUT);
Serial.begin(9600);
lcd.begin(16, 2);
lcd.display();
lcd.print("ENTER PASSWORD ");
lcd.setCursor(0, 1);
d= EEPROM.read(0);
d1= EEPROM.read(1);
d2= EEPROM.read(2);
d3= EEPROM.read(3);
}
void loop(){
char key = keypad.getKey();
if (key){
c++;
Serial.println(key);
lcd.print("*");
if(c==1){
d10=key;
}
if(c==2){
d11=key;
}
if(c==3){
d12=key;
}
if(c==4){
d13=key;
}
}
if(c==4&np==0){
c=0;
if(d==d10&d1==d11&d2==d12&d3==d13){
if(cp==0){
lcd.setCursor(0, 1);
lcd.print("PASSWORD ACCEPTED");
digitalWrite(10,HIGH);
delay(3000);
digitalWrite(10,LOW);
d10=d11=d12=d13=0;
lcd.setCursor(0, 1);
lcd.print(" ");
lcd.setCursor(0, 1);
}
if(cp==1){
lcd.clear();
lcd.print("NEW PASSWORD");
lcd.setCursor(0, 1);
np=1;
}}else if(d10=='0'&d11=='0'&d12=='0'&d13=='0'){
lcd.clear();
lcd.print("OLD PASSWORD");
lcd.setCursor(0, 1);
cp=1;
}else{
lcd.setCursor(0, 1);
lcd.print("WRONG PASSWORD");
if(cp==1){
cpa++;
}
delay(3000);
d10=d11=d12=d13=0;
lcd.setCursor(0, 1);
lcd.print(" ");
lcd.setCursor(0, 1);
}
}
if(cpa==3){
np=0;
cp=0;
cpa=0;
c=0;
d10=d11=d12=d13=0;
lcd.clear();
lcd.print("ENTER PASSWORD ");
lcd.setCursor(0, 1);
}
if(c==4&np==1){
d=d10;
d1=d11;
d2=d12;
d3=d13;
EEPROM.write(0, d);
EEPROM.write(1, d1);
EEPROM.write(2, d2);
EEPROM.write(3, d3);
np=0;
cp=0;
c=0;
d10=d11=d12=d13=0;
lcd.clear();
lcd.print("ENTER PASSWORD ");
lcd.setCursor(0, 1);
}
}
Power Supply
Perfect for: Arduino beginners, engineering students, DIY lovers, and security system projects.
Subscribe for more Arduino tutorials, DIY security projects, and electronic inventions!
tags:
arduino project,arduino door lock using 3x4 keypad and servo motor,arduino,arduino projects,password based door lock system using arduino,how to make password door lock arduino project,arduino door lock system,arduino door lock using 4x4 keypad and servo motor,arduino rfid tutorial,arduino rfid project,password based arduino security system,password based door lock system,arduino project for beginners,password based door lock system using arduino and keypad
#diy #tipsandtricks #scienceexperiment #DIYToys #HotWheels #RemoteControlCars #craftideas
Channel: My Technical Support
Subscribe now: / mytechnicalsupports
On My Technical Support channel, you can learn various inventions, science projects, crafts and DIYs teaching how to reuse or recycle.
You are watching video "INGENIOUS Idea! "
I hope you enjoy watching my video!