Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: RTC integration for time keeping while unplugged #1391
    onkel
    Participant

    Your code did not work but i fixed it by replacing the code in adjustClock() to:

    if (rtc.isrunning()) {
    now = rtc.now();
    rtc.adjust(DateTime(now.year(), now.month(), now.day(), currentHour, currentMinute, currentSecond));
    } else {
    rtc.adjust(DateTime(__DATE__, __TIME__));
    }

    This way the RTC is set to DATE/TIME when you first flash the firmware and after you can use the manual clock setting to adjust hour/minutes using the current date.

    in reply to: RTC integration for time keeping while unplugged #1388
    onkel
    Participant

    Never mind. I guess i found that you just need to replace “adjustClock()” with:

    if (!rtc.isrunning()) rtc.adjust(DateTime(__DATE__, __TIME__));

    Testing this tomorrow.

    in reply to: RTC integration for time keeping while unplugged #1384
    onkel
    Participant

    I have made the hardware hack.

    Please share the customized firmware to support the DS1307 with battery.

Viewing 3 posts - 1 through 3 (of 3 total)