Project in progress

Security System Using Password by Arduino & Python

This project is meant to protect you from any thief who may try to hack the password to your system.

  • 1,153 views
  • 0 comments
  • 5 respects

Components and supplies

Apps and online services

About this project

Here is a security system that you can use to protect yourself from a thief. It can send you a message to your Google account to warn you of someone trying to open your system.

Schematics

aa_b8CgiwIBPv.jpg
this circuit diagram which i used in my project
Aa b8cgiwibpv

Code

password.inoArduino
#include<LiquidCrystal.h>
#include "Keypad.h"
const byte row = 4;
const byte col = 4;
char keys[row][col]={
  {'1','2','3','A'},
  {'4','5','6','B'},
  {'7','8','9','C'},
  {'*','0','#','D'}
};
char pass[] = {'1','5','9','D','C','0'};
char newpass[6];
byte rowpins[] = {22,23,24,25};
byte colpins[] = {26,27,28,29};
int i= 0,f =0,c=0,error =0;
Keypad mykeypad = Keypad(makeKeymap(keys),rowpins,colpins,row,col);
LiquidCrystal lcd(7,6,5,4,3,2);
void print1(){
  lcd.clear();
  lcd.setCursor(0,0);
  lcd.print("Enter password ");
  lcd.setCursor(0,1);
   
  
}

void setup() {
  Serial.begin(9600);
  pinMode(13,OUTPUT);
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("* hello there * ");
delay(2000);
print1();
}

void loop() {

  char key = mykeypad.getKey();
  if(key !=NO_KEY && i<6){
  lcd.setCursor(i,1);
  lcd.print("*");
  newpass[i] = key;
  if(newpass[i]== pass[i])
  c++;
  i++;
  }
  if (c == 6){
    delay(500);
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("correct");
    digitalWrite(13,HIGH);
    delay(1000);
    digitalWrite(13,LOW);
    i=0;
    c=0;
    error = 0;
    print1();
  }
   
  if (c<6 &&i ==6){
        delay(500);
    lcd.clear();
    lcd.setCursor(0,0);
    lcd.print("Invalid Password");
    delay(1000);
    i=0;
    c=0;
    error++;
    if (error == 3){
      lcd.print("Invalid Password");
      lcd.setCursor(0,1);
      lcd.print("u must waite ");
      delay(1000);
      Serial.println("NNMM");
      
      for (int i=180;i>=0;i--){
        
        lcd.setCursor(13,1);
        lcd.print(i);
        delay(1000);
      }
      }
      else
      print1();
    }
  

}
ser.pyPython
import serial
import smtplib
from email.mime.text import MIMEText
acc = str(input("Enter your gmail account: "))
pas = str(input("Enter your gmail account password: "))
anacc = str(input("Enter the recipient account: "))
ser = serial.Serial("COM3",9600)
x = ser.readline()
x=x.decode("utf-8")
if (x[0] == "N"):
    s =  smtplib.SMTP("smtp.gmail.com",587)
    s.starttls()
    s.login(acc,pas)
    msg = MIMEText("<h1>Your system</h1><p>Hello man\n someone is trying to guess on your password"
                   +" blacky*</p>","html")
    msg ['Subject'] = "about your system"
    msg ['From'] = "Arduino"
    msg ['To'] = "blacky"
    s.sendmail(acc,anacc,str(msg))
    s.quit()

Comments

Similar projects you might like

Arduino Obstacle Avoidance Robot with Ultrasonic HC-SR04

Project tutorial by Jorge Rancé

  • 172 views
  • 0 comments
  • 2 respects

Using Finite State Machines

by Gustavo Gonnet

  • 5,292 views
  • 2 comments
  • 16 respects

Alexa: "Your Clothes Are Dry"

Project in progress by TNunnster

  • 1,113 views
  • 0 comments
  • 5 respects

Temperature Streaming with Arduino + Big Data Tools

Project showcase by Gabriel Rodriguez

  • 1,177 views
  • 1 comment
  • 13 respects

Bluetooth Speaker w/ Music-Reactive LED Matrix

Project tutorial by Modustrial Maker

  • 2,415 views
  • 0 comments
  • 7 respects

Climate Cube for Greenhouse

Project in progress by Istvan Sipka

  • 5,637 views
  • 2 comments
  • 30 respects
Add projectSign up / Login