Guest User

Untitled

a guest
Jul 16th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. void setup()
  2. {
  3. pinMode(2, INPUT);
  4. pinMode(13, OUTPUT);
  5. }
  6.  
  7. void loop()
  8. {
  9. if (digitalRead(2) == HIGH) {
  10. digitalWrite(13, HIGH);
  11. Serial.println("Motion detected!");
  12. delay(50000);
  13. } else {
  14. digitalWrite(13, LOW);
  15. Serial.println("Motion end!");
  16. }
  17. }
Add Comment
Please, Sign In to add comment