I'm building a Wordclock like many have done. So far I'm fine the the programming but want to add another feature.
Typically the clock (in English) is showing "IT IS SEVEN O'CLOCK". I want to put a botton on the back, when pressed for e.g. 5s the "IT IS" only shows up every 15 min, when pressed for 10s it shows up every 30 min, pressed for 30s it is always on.
Can some please give me some guidance how to implement this?
Use millis() to time how long the button is held down. Save this time in a global variable.
When displaying the time, have the code use the variable to decide whether to show the "IT IS" depending on the value of the variable and the current time.
Do you really want to hold a button for 30 seconds? I had to do that for something, and it got tiring after the first week. May I suggest one, two or three presses?
You will be using an RTC for the time. You can program "ITIS" to only light the first minute of the hour, or first five seconds of every minute, or chosen duration.
When you read the RTC, check the button flag and only display "IT IS" when "that many" top-of-the-minutes are ignored.
[edit]
But... isn't the purpose of a "word clock" to use words to describe sun position?