Hi guys, I posted a thread a number of months back regarding a circuit for automatically turning on the lighting in my house. (hence the thread for the relays!!!!) The system would work by have atwo infrared beams side to side across the doorway, this would pick up whether someone was entering or exiting the room, and a PIXE would monitor the number of bodys in the room, so that if 5 poeple entered and one exited the lights would not turn off, but if all 5 left the room the lights would turn off. Now, what i need help with is, can anyone think of a way, inwhich to cleverly over ride it, say for a bedroom when someone wanted to go to sleep. Now yes I could just connect it to a master light switch, but, you would have to turn this back on in the morning for the system to work, and I dont know about you, but I would keep forgeting, so i need a way of turning it off manually, but to reactivate in the mornings, or when automatic is needed does that make sense
What you do is you have a momentary switch which you push to turn the lights off and either have it so that if you leave the system turns back on or when you push the button again the system turns back on
like the sound of a mometnary switch, how do I make one of these, would I need to add to the program of the PIXE to know this is what it is
You can buy a momentary switch. The easyest way to implement the method I surgested is to use an intterupt.
Use a software intterupt. If you dont know what that is you realy need to learn more software before building your thing.
I wouldn't expect the code to be to complicated, an interupt might be a bit excessive. As fast as µCs run you might as well just poll the 1st beam, poll the 2nd, poll the switch, and then set the relay as needed.