[Hai-users] Motion Sensing Logic Befuddled
Byron Peebles
ByronPeebles at ieee.org
Sat Feb 17 15:31:17 CST 2007
I am attempting something very simple, but can't get things to work.
I have a wall switch that controls a light.
I can tell if the wall switch is ON or OFF.
I can sense when the wall switch is touched ON or OFF.
I have a motion sensor to cover the area.
What I want to do is:
When MOTION And-If DARK AndIf SW-Is-OFF
Turn SWitch ON for 1 Minute
OK, that's simple, but what if someone turns the switch OFF or ON during
the countdown?
Then, I want to prevent things from turning off when the timer expires.
WHEN MOTIONFOYER NOT READY &IF DARK &IF ra16_FOYER OFF
flgFOYERBUSY ON FOR 1 MINUTE
WHEN flgFOYERBUSY OFF &IF flagOVRRIDE3 OFF ra16_FOYER OFF
WHEN flgFOYERBUSY ON SET LIGHTING LEVEL ra15_FOYER to 40%
WHEN ra16_FOYER ON PRESSED flgOVRRIDE3 ON FOR 2 MINUTES
WHEN ra15_FOYER OFF PRESSED flgOVRRIDE3 OFF
No matter what, things go off after the one minute. Drives people nuts.
More information about the HAI-users
mailing list