Anti- Sleep Glass Using Arduino Nano
How it works?
Hello, In this project Ir sensor is playing a major role. This sensor is usually used to detect motion. In this Project, it is used to detect eye movement in real-time if there is no movement detected for 3 seconds(Time is adjustable head to the program code to adjust it) Automatically the vibration sensor starts vibrating and the buzzer starts producing sound. In this way, the driver was not allowed to sleep.
Components Used:-
Arduino Nano - 1
IR Sensor or Eye Blink Sensor - 1
Vibration Module - 1
5V Buzzer - 1
9V Battery - 1
Buy the Kit here on our store -
Circuit Diagram
Image Credits-Innovative Ideas on Youtube
Arduino code:
#define SENSE A0
void setup()
{
pinMode(SENSE, INPUT);
pinMode(2, OUTPUT);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
if(digitalRead(SENSE))
{
digitalWrite(LED_BUILTIN, LOW);
pinMode(2, LOW);
}
else
{
delay (2000);
if(digitalRead(SENSE))
{
digitalWrite(LED_BUILTIN, LOW);
pinMode(2, LOW);
}
else
digitalWrite(LED_BUILTIN, HIGH);
pinMode(2, HIGH);
}
}
0 Reviews
Your rating