Add the following snippet to your HTML:<iframe frameborder='0' height='385' scrolling='no' src='https://www.hackster.io/energen/make-automated-smart-light-d548d2/embed' width='350'></iframe>
How to make auto on/off the light using PIR sensor
Read up about this project on
watch theFull project on youtube.
void setup() { pinMode(7,OUTPUT); pinMode(11,INPUT); } void loop() { // put your main code here, to run repeatedly: int val = digitalRead(11); if( val == 1){ digitalWrite(7, LOW); delay(1000); } else{ digitalWrite(7, HIGH); delay(1000); } }
Please log in or sign up to comment.
Comments
Please log in or sign up to comment.