Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Motion sensors for directionality

Featured Replies

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?

  • Author

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?

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.