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);
}
}
17 Comments
How can i use it
ReplyDeleteJust upload it to arduino
Deleteits showing sense error 3rd row
Deletethis is wrong code
DeleteYes it is for eye blink sensor
DeleteSir wher we have to put the switch
DeleteSir can I get this product ready made
ReplyDeleteSir which code you have used in this project
ReplyDeleteThis comment has been removed by the author.
DeleteSir what is LED-BUILTIN in this program
ReplyDeleteLed builtin is D13 of nano connected internally to LED
DeleteSir can I get ready made
ReplyDeleteYes I have made it
DeleteWhere to write this code
ReplyDeleteSir ir sensor sense nei kr rha h continue weep kr rha h pls diagram send kro
ReplyDeletePlease provide authentic code. Which you have uploaded
ReplyDeleteProgram upload nahi ho raha hai kya karan ho sakta hai
ReplyDelete