Let's try to get more information.
Use this sketch and post the error log:
Code: Select all
#include "Arduino.h"
#include "Wire.h"
#include <ZUNO_DS3232RTC.h>
#include <Time.h>
#define MY_SERIAL Serial
DS3232RTC myRTC;
tmElements_t te, te_r;
time_t ts; // secs since 1900.
void setup() {
MY_SERIAL.begin(9600);
te.Second = 30;
te.Minute = 32;
te.Hour = 13;
te.Wday = 6;
te.Day = 8;
te.Month = 6-1;
te.Year = 2024 -1900;
myRTC.write(&te);
}
void loop() {
if (myRTC.read(&te_r) != WIRE_ERORR_TRANSMISSION_SUCCESS) {
MY_SERIAL.print("myRTC.read - error\n");
}
disp();
delay(10000);
}
void disp(void){
MY_SERIAL.print("dump: ");
MY_SERIAL.dumpPrint(&te_r, sizeof(te_r), sizeof(te_r));
MY_SERIAL.printf("\n*************\n%04d-%02d-%02d %02d:%02d:%02d : Weekday = %d.\n", te_r.Year + 1900, te_r.Month + 1, te_r.Day, te_r.Hour, te_r.Minute, te_r.Second, te_r.Wday);
}