PIR Sensor #555-28027 and the debug window.
wrathofskidog1987
Posts: 3
I am using the PIR Sensor #555-28027 and playing with the sample code that comes with it as seen below:
' =========================================================================
' File...... PIR_Simple.bs2
' Purpose... Show Output State Of PIR Sensor
' Author.... Parallax, Inc.
' E-mail.... support@parallax.com
' Started... 12-14-2005
' {$STAMP BS2p}
' {$PBASIC 2.5}
'
'
[noparse][[/noparse] Program Description ]
' This program displays the current state of the PIR Sensor connected to P9
' on the DEBUG screen.
'
[noparse][[/noparse] Program Code ]
Main:
DO
DEBUG HOME, BIN1 IN9 ' Display Status Of P9 At Home Pos.
PAUSE 100··········· ' Small Delay
LOOP················ ' Repeat Forever
I have the sensor set to High which does this:
Output remains HIGH when sensor is retriggered repeatedly. Output is LOW when idle (not triggered).
I have the Basic Stamp 2P40.
I have the sensor wired up with an LED on its output to verify that the sensor is indeed triggering.· However I am stumped with the zero in the debug window when my sensor is triggered or not.
' =========================================================================
' File...... PIR_Simple.bs2
' Purpose... Show Output State Of PIR Sensor
' Author.... Parallax, Inc.
' E-mail.... support@parallax.com
' Started... 12-14-2005
' {$STAMP BS2p}
' {$PBASIC 2.5}
'
'
[noparse][[/noparse] Program Description ]
' This program displays the current state of the PIR Sensor connected to P9
' on the DEBUG screen.
'
[noparse][[/noparse] Program Code ]
Main:
DO
DEBUG HOME, BIN1 IN9 ' Display Status Of P9 At Home Pos.
PAUSE 100··········· ' Small Delay
LOOP················ ' Repeat Forever
I have the sensor set to High which does this:
Output remains HIGH when sensor is retriggered repeatedly. Output is LOW when idle (not triggered).
I have the Basic Stamp 2P40.
I have the sensor wired up with an LED on its output to verify that the sensor is indeed triggering.· However I am stumped with the zero in the debug window when my sensor is triggered or not.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
·I used an led too... but put it on it's own output pin with a 470 resistor.
Use code to make out high to Led when PIR is sensing.
RC