ET3451 MINI PROJECT
ET3451 MINI PROJECT
AIM:
To implement the smart lock system using python
SOFTWARE REQUIRED:
1.Python (or) Google Colab.
INTRODUCTION:
In today's world, ensuring the safety and security of homes and offices is more crucial
than ever. Traditional lock-and-key systems are increasingly being replaced by smart locks,
which offer better control, convenience, and integration with modern technology.
This project focuses on developing a Smart Lock System using Python and Internet of
Things (IoT). The system is designed to allow or deny access to a secured space based on user
authentication, which can be managed remotely using IoT technology.
PROCEDURE:
Step 1: Open Google Colab
Load necessary libraries (cv2,numpy, GPIO or serial for hardware, Firebase, etc.).
Else:
Send command to unlock door using GPIO (e.g., activate a relay or servo).
#include <LiquidCrystal.h>
#include <Servo.h>
#define Password_Length 5
Servo myservo;
int pos = 0;
char Data[Password_Length];
bool Pass_is_good;
char customKey;
/*---preparing keypad---*/
char keys[ROWS][COLS] = {
void setup()
ServoClose();
lcd.begin(16, 2);
lcd.print("Protected Door");
loading("Loading");
lcd.clear();
void loop()
if (door == true)
customKey = customKeypad.getKey();
if (customKey == '#')
lcd.clear();
ServoClose();
else
Open();
lcd.setCursor(0, 1);
lcd.print(msg);
delay(1000);
lcd.print(".");
void clearData()
while (data_count != 0)
Data[data_count--] = 0;
return;
void ServoClose(){
for (pos = 90; pos >= 0; pos -= 10) {
myservo.write(pos);
void ServoOpen()
myservo.write(pos);
void Open()
lcd.setCursor(0, 0);
lcd.print("Enter Password");
customKey = customKeypad.getKey();
if (customKey)
Data[data_count] = customKey;
lcd.setCursor(data_count, 1);
lcd.print(Data[data_count]);
data_count++;
if (data_count == Password_Length - 1) {
if (!strcmp(Data, Master))
lcd.clear();
ServoOpen();
door = true;
delay(5000);
loading("Waiting");
lcd.clear();
delay(1000);
ServoClose();
door = false;
else
lcd.clear();
door = false;
delay(1000);
lcd.clear();
clearData();}}
OUTPUT:
RESULT:
Thus the implementation of Smart Lock System was simulated successfully using python
code.