Jump to content

Motion sensors for directionality


khisanthax

Recommended Posts

Posted

So I was wondering if any one has tried using multiple motion sensors to determine direction? For example, walking towards a room triggers multiple sensors in order which let's you know what room or area to turn lights on for. Or multiple sensors to accurately determine motion in a large room?

Posted

What I Didn't see was code for direction. I liked that Lee used variables but it also looks like the order of the trigger doesn't matter so long as both ms are turned on that's all that matters. For me turning on 1 then 2 is different than 2 then 1. Did I Read the code wrong?

Posted

I will repost this here then

This takes up to four programs but could be combined into three possibly or jus two if the direction of travel is known. I present it as educational tool.

 

If

    MS1 is switched 'On'

Then

    Enable 'Program1'

    Wait 1 Minute

    Disable 'Program1'

Else

  --

 

If

    MS2 is switched 'On'

Then

    Enable 'Program2'

    Wait 1 Minute

    Disable 'Program2'

Else

  ---

 

Program1 (disabled)

-------------

If

    MS2 is switched 'On'

Then

    do stuff - motion went from MS1-MS2

Else

   ---

 

Program2 (disabled)

-------------

If

    MS1 is switched 'On'

Then

    do stuff - motion went from MS2-MS1

Else

   ---

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.5k
×
×
  • Create New...