PIR sensor error?
raulduke1011
Posts: 17
Does anyone have any suggestions as to what can cause the PIR sensor results to make no sense? I have it hooked up to my bs2sx and am using the code below. It will either show movement(1) for no reason or not sense movement when it should. Thanks.
FOR i = 1 to 30
IF (IN0 = 1) THEN
' handle movement'
ELSE
' no movement
ENDIF
PAUSE 100
NEXT
FOR i = 1 to 30
IF (IN0 = 1) THEN
' handle movement'
ELSE
' no movement
ENDIF
PAUSE 100
NEXT
Comments
"The PIR Sensor requires a ‘warm-up’ time in order to function properly. This is due to the settling time involved in ‘learning’ its environment. This could be anywhere from 10-60 seconds. During this time there should be as little motion as possible in the sensors field of view. "
-Phil
The PIR (as with any such device) is intended to remain still. Motion immediately causes the device to detect said activity and will trigger. Following that the settling time will be re-instated since everything the sensor sees will have changed dramatically.· Moving the sensor itself will only result in highly erratic readings.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support