Smart Home Automation Forum
KC868-A6 DS1307 Issue - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1)
+--- Forum: KC868-A series and Uair Smart Controller (https://www.kincony.com/forum/forumdisplay.php?fid=6)
+--- Thread: KC868-A6 DS1307 Issue (/showthread.php?tid=2358)

Pages: 1 2 3


RE: KC868-A6 DS1307 Issue - admin - 10-25-2022

Do you have buy from our official store? give us your order number, we re-send a new KC868-A6 PCB board to you.


RE: KC868-A6 DS1307 Issue - Senapsys - 10-25-2022

Hi
I've sent you a private message with the details.
Thanks for your help :-)


RE: KC868-A6 DS1307 Issue - admin - 10-25-2022

ok


RE: KC868-A6 DS1307 Issue - Djoii - 01-03-2023

Bonsoir à tous
Je n'ai pas compris cette conclusion pour l'utilisation du DS1307
De belles études en perspective !
A+
Djoii


RE: KC868-A6 DS1307 Issue - admin - 01-04-2023

he have replaced with a new A6 boardSmile


RE: KC868-A6 DS1307 Issue - Fridays - 09-24-2023

(10-23-2022, 06:50 AM)Senapsys Wrote: Hi there

I'm having an issue with getting the KC868-A6 RTC working.

I've taken the example code in the A6 thread as per below, and it returns an error of "Couldn't find RTC".

I've made sure that the I2C SDA and SCL pins are set correctly in the NodeMCU-32S config file.

The RTClib I've used is the Adafruit library below:
https://github.com/adafruit/RTClib

The battery has been installed into the socket on the board.  I've successfully coded up things so that the PCF8574 outputs and inputs to work so I know that the I2C SDA and SCL are working.

The comments in the example code mention the Wire lib, so I've tried including this as well, but it didn't fix the problem.

Any thoughts would be appreciated.


/*KC868-A6 DS1307 CODE*/
// Date and time functions using a DS1307 RTC connected via I2C and Wire lib
#include "RTClib.h"

RTC_DS1307 rtc;

char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};

void setup () {
  Serial.begin(115200);

#ifndef ESP8266
  while (!Serial); // wait for serial port to connect. Needed for native USB
#endif

  if (! rtc.begin()) {
    Serial.println("Couldn't find RTC");
    Serial.flush();
    while (1) delay(10);
  }

  if (! rtc.isrunning()) {
    Serial.println("RTC is NOT running, let's set the time!");
    // When time needs to be set on a new device, or after a power loss, the
    // following line sets the RTC to the date & time this sketch was compiled
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
    // This line sets the RTC with an explicit date & time, for example to set
    // January 21, 2014 at 3am you would call:
    // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0));
  }

  // When time needs to be re-set on a previously configured device, the
  // following line sets the RTC to the date & time this sketch was compiled
  // rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
  // This line sets the RTC with an explicit date & time, for example to set
  // January 21, 2014 at 3am you would call:
  // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0));
}

void loop () {
    DateTime now = rtc.now();

    Serial.print(now.year(), DEC);
    Serial.print('/');
    Serial.print(now.month(), DEC);
    Serial.print('/');
    Serial.print(now.day(), DEC);
    Serial.print(" (");
    Serial.print(daysOfTheWeek[now.dayOfTheWeek()]);
    Serial.print(") ");
    Serial.print(now.hour(), DEC);
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();

    Serial.print(" since midnight 1/1/1970 = ");
    Serial.print(now.unixtime());
    Serial.print("s = ");
    Serial.print(now.unixtime() / 86400L);
    Serial.println("d");

    // calculate a date which is 7 days, 12 hours, 30 minutes, and 6 seconds into the future
    DateTime future (now + TimeSpan(7,12,30,6));

    Serial.print(" now + 7d + 12h + 30m + 6s: ");
    Serial.print(future.year(), DEC);
    Serial.print('/');
    Serial.print(future.month(), DEC);
    Serial.print('/');
    Serial.print(future.day(), DEC);
    Serial.print(' ');
    Serial.print(future.hour(), DEC);
    Serial.print(':');
    Serial.print(future.minute(), DEC);
    Serial.print(':');
    Serial.print(future.second(), DEC);
    Serial.println();

    Serial.println();
    delay(3000);
}
Smile


RE: KC868-A6 DS1307 Issue - admin - 09-24-2023

https://www.kincony.com/forum/showthread.php?tid=1863 is this code can work well? if can't work, remove the battery, have a test.


RE: KC868-A6 DS1307 Issue - Adriano - 09-24-2024

Hi, I have a problem with the KC868-A6 board. The DS1307 doesn't seem to work. I followed the instructions for Arduino found on this thread and got the error: Couldn't find RTC. The problem is the same with ESPhome. How can I solve the problem?
I attach log of the Arduino IDE and ESPhome

   

   

   


RE: KC868-A6 DS1307 Issue - admin - 09-24-2024

1. do you have defined i2c bus SDA and SCL pin in your arduino config file?
2. do you have installed batttery? if installed, try to remove it.


RE: KC868-A6 DS1307 Issue - Adriano - 09-24-2024

(09-24-2024, 12:40 PM)admin Wrote: 1. do you have defined i2c bus SDA and SCL pin in your arduino config file?
2. do you have installed batttery? if installed, try to remove it.

1) The pins are ok. 
2) The problem is with the battery. If I remove it, both Arduino and esphome work. I tested the battery and it is new and working

Some suggestions?