Sunday, 5 December 2021

Accident Prevention System Using Eye Blink Sensor

Circuit Diagram


Code


int sensor = 8;
int buzzer = 11;
int motor = 6;
void setup()
{
 
  pinMode(buzzer, OUTPUT);
  pinMode(sensor,INPUT);
  pinMode(motor,OUTPUT);
  digitalWrite(motor,HIGH);
}

// the loop function runs over and over again forever
void loop() {
  if(digitalRead(sensor)==1)
  {
    digitalWrite(11,LOW);
    digitalWrite(motor,HIGH);
  }
  else
  {
    delay(3000);
    digitalWrite(11,HIGH);
    digitalWrite(motor,LOW);
  }
  
}


You can purchase this kit from here:-
https://amzn.to/3ly2eHu

Raw material:-
https://amzn.to/3po7ZIW
https://amzn.to/3lCL9vX
https://amzn.to/3IpbrM0

Saturday, 9 January 2021

Intruder Detection System Using PIR and ISD1820

Circuit:-


 


Code:- 

int pir = 8;
int speaker = 9;
void setup()
{
  
pinMode(pir,INPUT);
pinMode(speaker,OUTPUT);
}

void loop()
{
  if(digitalRead(pir)==1)
  {
    digitalWrite(9,HIGH);
  }
  else
  {
     digitalWrite(9,LOW);
  }
}