i am working with DS3231 RTC module. I made my own module and i am using only SCL and SDA pins, because i need only accurate clock. I configured clock and RTC library without any bigger problems so now i can see correctly setted time and date via serial interface.
Now i want to use this with some other I/O devices but i don't know how. For example, i would like to turn LED on at 20h and turn it off at 6h every day. I can't find any similar tutorials to learn how to do that, because this is the first time i am working with RTC.
I tried it with minutes and seconds and it works! So, if i understand it correctly, all tasks, which are time depended, could be treated like this (since i don't need alarms).
Some things like digitalWrite() are idempotent (which means calling them several times in a row with same
arguments is equivalent to calling once only), and these can be done this way.
If you have something non-idempotent (such as outputing a beep) you would probably need to test for the
time havnig changed since the last test.
I would like to add two push buttons to set hours and minutes only. I tried to combine a lot of different tutorial codes from web but i can't change only hours or minutes. If i want to change only hour, i can't update the time in that format. I would like to use only LCD screen and 2 push buttons, not the whole keypad with menu options for complete date and time setting. Like simple car clock.
Idea is to read current hour setting and update it for 1 hour on push button click (the same for minute). Something like this "if (button == HIGH) now.hour()++"
Currently i am trying to change this part of code..