pir sensor unresponsive, always high?
Hi all,
I'm trying to use a parallax pir sensor and the homework board to trigger a motorized effect. I have the relay circuit working, but the sensor isn't really responding to anything. My code is below, it seems pretty straightforward but obviously something is amiss. I have it running with a piece of paper covering the sensor in the hopes it will calibrate itself. Any ideas?
I'm trying to use a parallax pir sensor and the homework board to trigger a motorized effect. I have the relay circuit working, but the sensor isn't really responding to anything. My code is below, it seems pretty straightforward but obviously something is amiss. I have it running with a piece of paper covering the sensor in the hopes it will calibrate itself. Any ideas?
' {$STAMP BS2} ' {$PBASIC 2.5} INPUT 0 IF IN0 = 1 THEN GOSUB move IF IN0 = 0 THEN GOSUB no move: HIGH 10 DEBUG "move" PAUSE 500 LOW 10 RETURN no: DEBUG "still" RETURN
Comments
Second, put a multimeter on the PIR sensor output lead and make sure it's working properly.
Third, make sure the PIR connections to the Stamp are correct.
Then report back, soldier.
Quite possibly.
I have used the PIR sensor and it works very reliably when connected properly.