Newbie Code Question: How is motion sensor tigger controlling code flow?
Sensor last edited by
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?
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