Has anyone done a flowchart covering the use of a PIR in an alarm circuit. I will look later at using two devices to check if both triggered same time.
However I am lost knowing when to say that's it, sound the alarm.
I started using a do loop to catch the PIR first being triggered.
I then did an evaluation part to time the PIR resetting itself.
After this do I fire warning beeps before checking again?
I ended up doing reams of rechecks before commiting to sound alarms.
Has anybody worked out a sensible flowchart in this area?
However I am lost knowing when to say that's it, sound the alarm.
I started using a do loop to catch the PIR first being triggered.
Code:
do loop while pinC.2 = 0 ' pinC.2 = 1 if movement
Code:
for b2=1 to 10
PAUSE 250
IF pinC.2 = 0 THEN goto BB ' PIR cleared
PAUSE 250
Next b2
' If takes longer than this section then PIR seeing constant movement
I ended up doing reams of rechecks before commiting to sound alarms.
Has anybody worked out a sensible flowchart in this area?