Posts: 6,269
Threads: 806
Joined: Oct 2020
Reputation:
152
Do you have buy from our official store? give us your order number, we re-send a new KC868-A6 PCB board to you.
Posts: 7
Threads: 2
Joined: Oct 2022
Reputation:
0
Hi
I've sent you a private message with the details.
Thanks for your help :-)
Posts: 6,269
Threads: 806
Joined: Oct 2020
Reputation:
152
Posts: 18
Threads: 0
Joined: Dec 2022
Reputation:
0
Bonsoir à tous
Je n'ai pas compris cette conclusion pour l'utilisation du DS1307
De belles études en perspective !
A+
Djoii
Posts: 6,269
Threads: 806
Joined: Oct 2020
Reputation:
152
he have replaced with a new A6 board
Posts: 1
Threads: 0
Joined: Sep 2023
Reputation:
0
(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);
}
Posts: 6,269
Threads: 806
Joined: Oct 2020
Reputation:
152
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.
Posts: 2
Threads: 0
Joined: Sep 2024
Reputation:
0
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
Posts: 6,269
Threads: 806
Joined: Oct 2020
Reputation:
152
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.
Posts: 2
Threads: 0
Joined: Sep 2024
Reputation:
0
(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?
|