motion sensor is used to detect the any object
Fork of HelloWorld by
Revision 3:085dbf0f0726, committed 2016-12-01
- Comitter:
- sumanshavi
- Date:
- Thu Dec 01 10:45:55 2016 +0000
- Parent:
- 2:e78cebb5a0d5
- Commit message:
- motion sensor
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
motionsensor.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Dec 01 10:39:34 2016 +0000 +++ b/main.cpp Thu Dec 01 10:45:55 2016 +0000 @@ -9,7 +9,7 @@ wait(2); //Wait for sensor to take snap shot of still room while(1) { - if (motion==0){ + if (motion==1){ buzzer=1; wait(2); }
--- a/motionsensor.h Thu Dec 01 10:39:34 2016 +0000 +++ b/motionsensor.h Thu Dec 01 10:45:55 2016 +0000 @@ -8,7 +8,7 @@ wait(2); //Wait for sensor to take snap shot of still room while(1) { - if (motion==0){ + if (motion==1){ buzzer=1; wait(2); }