
WayneA.
USA
Asked
— Edited
Good Morning!
I had a thought of using my EZB to turn on and turn off my holiday lights on my house. The only issue I think I may have is the code. I do not know enough code to turn on lights at 6pm and then turn off at 11pm.
Would anyone in the community be willing to help with this code?
Thanks Wayne
This code will do the timing;
@bhouston This is all that is needed? Seems to easy!
You will have to put in what you are doing to turn the lights on and off. How are you doing that?
My thought was to turn a Digital Pin high to turn on a transitor, to turn on a relay.
That should work?
I know the Digital Pin cannot sink or source a lot of current. So, I would need a transistor. OR, find a 5V relay with a low amount of current needed to operate, then that could drive the coil of a 120V AC relay, then the contacts would in turn drive the lights on my house.
At the time I asked the question, I really did not put much thought into the electronics needed to make it work. I thought it was a silly idea, but since I am not home at dark, I thought it would be kinda cool for the lights to turn on and off by themselves.
Has anyone on the forum done this before?
Given that you also need to power the EZ-B, this seems kind of overkill when you can do the same thing with a $10 electric timer, but just as a proof of concept that it can be done, yeah, no reason your concept shouldn't work.
Alan