i need help


arduino-timer-relay.zip (2.59 KB)

Please read the forum rules and put you code in code blocks, most on here will not go to the trouble of downloading a zip file.

Hi Newbee,
here is a link with tips how to speed up getting good answers
best regards Stefan

You wrote the question

i have this code for my project (relay timer)
there is setup for relay timer ( ON , OFF)
there are only hours and minutes
i need also second but how ?

This is a pretty global question.
I will translate your question to my impression:

here is my code. please analyse my code for 1 to 3 hours to understand what the code does and then add
functionality for adjusting seconds.

Your chance to get answers wil rise if you re-write your question to be more specific.
did you look up if the libraries that you are using have some examples?

If you post your code as it is working now and additional your first try how adding seconds could look like
you will make a completely different impression:

Then the impression would be: " I made a first try how to add seconds to my code but the result I get is ...."
can somebody point me to what I'm doing wrong

best regards Stefan
any newbee can apply the most professional habit from the first line of code they write on their own:
add only ONE thing at a time. Test/debug that ONE thing until that ONE thing works reliable - repeat.
The sad thing is: only the REAL professionals write code this way.

That sketch is poorly written. It uses groups of variables that have the same name except for a trailing number which is a sure sign that it should have been done with arrays instead. Most parts of the code are 13-times longer than they need to be because of using 13 variables instead of one array.

Currently Hour and Minute are saved in EEPROM for each relay. You will need to add Seconds for each.

Currently the Left and Right buttons set Hour and the Up and Down buttons set Minute. There are no LCD buttons left to adjust Seconds. You will need to re-think the part about adjusting the time. Perhaps the Left and Right buttons to select which of the 6 digits to adjust and the Up and Down buttons to adjust the digit.