dan-cleinmark / nodemcu-motion_detector

Motion detection with the NodeMCU and a HC-SR501 PIR motion sensor
MIT License
4 stars 4 forks source link

sensor will send a signal With or without movement #1

Open xnathanh opened 8 years ago

xnathanh commented 8 years ago

connections: pir501 VCC-vin(5v) nodemcu pir501 OUT-D4 nodemcu pir501 GND-GND nodemcu

console print out: ESP8266 Started Compile File:motion_test.lua Remove File:motion_test.lua

Motion detected! [DEBUG] start: 5, last: 0, break: 5 motion ended after 4 seconds. [DEBUG] start: 5, duration: 4 Motion detected! [DEBUG] start: 14, last: 9, break: 5 motion ended after 4 seconds. [DEBUG] start: 14, duration: 4 Motion detected! [DEBUG] start: 24, last: 18, break: 6 motion ended after 5 seconds. [DEBUG] start: 24, duration: 5 Motion detected! [DEBUG] start: 34, last: 29, break: 5 motion ended after 5 seconds. [DEBUG] start: 34, duration: 5 Motion detected! [DEBUG] start: 44, last: 39, break: 5 motion ended after 5 seconds. [DEBUG] start: 44, duration: 5 Motion detected! [DEBUG] start: 55, last: 49, break: 6 motion ended after 4 seconds. [DEBUG] start: 55, duration: 4 Motion detected! [DEBUG] start: 65, last: 59, break: 6 motion ended after 5 seconds. [DEBUG] start: 65, duration: 5 Motion detected! [DEBUG] start: 76, last: 70, break: 6 motion ended after 4 seconds. [DEBUG] start: 76, duration: 4 Motion detected! [DEBUG] start: 86, last: 80, break: 6 motion ended after 5 seconds. [DEBUG] start: 86, duration: 5 Motion detected! [DEBUG] start: 96, last: 91, break: 5 motion ended after 5 seconds. [DEBUG] start: 96, duration: 5 Motion detected! [DEBUG] start: 108, last: 101, break: 7 motion ended after 4 seconds. [DEBUG] start: 108, duration: 4 Motion detected! [DEBUG] start: 117, last: 112, break: 5 motion ended after 6 seconds. [DEBUG] start: 117, duration: 6 Motion detected! [DEBUG] start: 129, last: 123, break: 6 motion ended after 3 seconds. [DEBUG] start: 129, duration: 3 Motion detected! [DEBUG] start: 138, last: 132, break: 6 motion ended after 5 seconds. [DEBUG] start: 138, duration: 5 Motion detected! [DEBUG] start: 148, last: 143, break: 5 motion ended after 5 seconds. [DEBUG] start: 148, duration: 5 Motion detected! [DEBUG] start: 159, last: 153, break: 6 motion ended after 4 seconds. [DEBUG] start: 159, duration: 4 Motion detected! [DEBUG] start: 169, last: 163, break: 6 motion ended after 4 seconds. [DEBUG] start: 169, duration: 4 Motion detected! [DEBUG] start: 181, last: 173, break: 8 motion ended after 4 seconds. [DEBUG] start: 181, duration: 4 Motion detected! [DEBUG] start: 190, last: 185, break: 5 motion ended after 6 seconds. [DEBUG] start: 190, duration: 6 Motion detected! [DEBUG] start: 201, last: 196, break: 5 motion ended after 4 seconds. [DEBUG] start: 201, duration: 4 Motion detected! [DEBUG] start: 211, last: 205, break: 6 [DEBUG] start: 169, last: 163, break: 6 motion ended after 4 seconds. [DEBUG] start: 169, duration: 4

dan-cleinmark commented 8 years ago

@xnathanh can you verify that you have 5V to the 501? The other thing we saw was that if motion is continually detected, it would be broken up into many smaller events like what you pasted above. If the 501 is completely covered, does it still register motion?