hi I’m new to all of this, but I have a 4 relay particle board and I am using an electron to turn a relay on all it does it turn a 12v led light bar on, the reason I need a timer is the system runs off a solar panel and want a safety as in if I forget to turn the light off it will time out and turn off, thinking of an hour timer
but I still want the ability to turn it off manually before the timer is due,
can anyone help or point me in the right direction for a simple timer?
You can use Software Timers or check the current time (or millis()) against the time when your action started and trigger the off action once the difference exceeds your timeout.
Here is some sample code that shows how a time variable can be set when you turn the light on, and how loop() can turn it off when current time reaches the set time.
thanks for the reply sorry I have been away working and haven’t had a chance to reply, I will go through the the options but the timer looks like a good option bear, and scruffr