Accident Prevention System using the Eye-blink Sensor

In this article, I will guide you on how you can make the best project on an Accident prevention system using the eye-blink sensor. The complete tutorial of this project is freely available on this video. This video provides step by step guide for the same. And in case you find any difficulty then you can ask through comment or email. We will definitely help you out. The complete list of raw materials needed for the project is also discussed in the video. Here in this article, I am also sharing a circuit diagram and code that will help you in the best way possible. 

Free Video Tutorial of Accident Prevention System using Eye-blink Sensor:

 

Circuit Diagram for Accident Prevention System:

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 the complete kit of this project by clicking here.
 
Get the raw material for this project by clicking here.