Newbie Code Question: How is motion sensor tigger controlling code flow?
-
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
-
@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.
-
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
-
@Sensor you could also checkout @mfalkvidd's dimmable LED kitchen light project for autonomous dimming using a local gesture or proximity sensor.