Hello,
I want to create a clock with an oled display and an RTC DS3231.
I could make things running as I wanted to. Display works and I can see the Time and anything else. But, how can I set the time by using buttons ?
just as an easy example: I want to push a button and then the hours or minutes shall rise. How can I do it ?
If I upload the example code, it can set itself by using this line:
rtc.adjust(DateTime(F(DATE), F(TIME)));
I also can set the clock by using this line of code:
rtc.adjust(DateTime(2023, 9, 27, 9, 30, 0));
I tryed something like this as a button function.
rtc.adjust(DateTime(now.hour()+1));
It did compile but didn´t work !
Can someone help ?