Frist off all thanks for lending me code when I need it,
My new project is a little more complex then I got the skills for, so can community can you help me out??
The end goal is to turn on a light by another light.
So when going into a room a toggle a light switch from off -> on -> off -> on -> off -> on within 2-3 seconds it pulls a relay high and another light comes on, 15 minutes later the relay goes low and system returns to start.
The toggle switch and lights your refering to, are they using mains AC power or something else?
If they are mains then how are you detecting the light on/off toggle?