Motion sensor arduino Tutorial
SKETCH CODE:\r
\r
void setup() {\r
\r
int sensor = 8;\r
pinMode(sensor,INPUT);\r
pinMode(3,OUTPUT);\r
}\r
\r
void loop() {\r
int sensor = 8; if (digitalRead(sensor) == HIGH) digitalWrite(3,HIGH);\r
\r
else digitalWrite(3,LOW);\r
\r
}
\r
void setup() {\r
\r
int sensor = 8;\r
pinMode(sensor,INPUT);\r
pinMode(3,OUTPUT);\r
}\r
\r
void loop() {\r
int sensor = 8; if (digitalRead(sensor) == HIGH) digitalWrite(3,HIGH);\r
\r
else digitalWrite(3,LOW);\r
\r
}