Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. Newbie Code Question: How is motion sensor tigger controlling code flow?

Newbie Code Question: How is motion sensor tigger controlling code flow?

Scheduled Pinned Locked Moved Development
4 Posts 4 Posters 1.1k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Very new to all of this. Just built the backlit mirror using Pete's example. It works but the motion sensor isn't triggering the lights. I can see it get triggered off and on in the serial monitor. My question is where in the code does the motion sensor turn the lights on and off?

    https://forum.mysensors.org/topic/936/backlit-dimmable-led-mirror-with-motion-sensor/2

    blaceyB 1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      @Sensor said:

      https://forum.mysensors.org/topic/936/backlit-dimmable-led-mirror-with-motion-sensor/2

      Line 248.

      I suspect @petewill turns on the light from the controller when he receives the motion trigger.

      petewillP 1 Reply Last reply
      0
      • hekH hek

        @Sensor said:

        https://forum.mysensors.org/topic/936/backlit-dimmable-led-mirror-with-motion-sensor/2

        Line 248.

        I suspect @petewill turns on the light from the controller when he receives the motion trigger.

        petewillP Offline
        petewillP Offline
        petewill
        Admin
        wrote on last edited by
        #3

        Yes, that is correct. I wanted more control over when the light gets turned on and at what brightness. The motion sensor just sends the triggered state back to the controller and the controller decides to turn the lights on. This keeps the lights from turning on when I'm sleeping :)

        My "How To" home automation video channel: https://www.youtube.com/channel/UCq_Evyh5PQALx4m4CQuxqkA

        1 Reply Last reply
        0
        • ? A Former User

          Very new to all of this. Just built the backlit mirror using Pete's example. It works but the motion sensor isn't triggering the lights. I can see it get triggered off and on in the serial monitor. My question is where in the code does the motion sensor turn the lights on and off?

          https://forum.mysensors.org/topic/936/backlit-dimmable-led-mirror-with-motion-sensor/2

          blaceyB Offline
          blaceyB Offline
          blacey
          Admin
          wrote on last edited by blacey
          #4

          @Sensor you could also checkout @mfalkvidd's dimmable LED kitchen light project for autonomous dimming using a local gesture or proximity sensor.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          14

          Online

          11.7k

          Users

          11.2k

          Topics

          113.1k

          Posts


          Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • MySensors
          • OpenHardware.io
          • Categories
          • Recent
          • Tags
          • Popular