it seems, that RTC DS1307 don't work normal anymore!?
RTC DS1307: SimulIDE 1.0.0 SR0-Stable - Linux64
the same sim1-file works very well under…
1.0.0 R1314! (2023-03-08)
and
1.0.0 RC3 (2022-10)
(tested with uno & nano)
in setup:
results…
R1314 & RC3: "RTC is running"
SR0-Stable: "RTC is NOT running!"
RTClib is: github.com/adafruit/RTClib
hope that helps…
RTC DS1307: SimulIDE 1.0.0 SR0-Stable - Linux64
the same sim1-file works very well under…
1.0.0 R1314! (2023-03-08)
and
1.0.0 RC3 (2022-10)
(tested with uno & nano)
in setup:
- Code:
if (! rtc.isrunning()) {
Serial.println("RTC is NOT running!");
rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
Serial.println("RTC adjusted!");
}
else {
Serial.println("RTC is running");
}
results…
R1314 & RC3: "RTC is running"
SR0-Stable: "RTC is NOT running!"
RTClib is: github.com/adafruit/RTClib
hope that helps…
- Code:
#include <Wire.h>
#include "RTClib.h"
// RTC_Millis rtc;
RTC_DS1307 rtc; // i2c 0x68
void setup() {
while (!Serial);
Serial.begin(57600);
Serial.println();
Serial.println("timestamp: "__DATE__" "__TIME__);
if (! rtc.begin()) {
Serial.println("Couldn't find RTC");
while (1);
}
else {
Serial.println("RTC found");
}
if (! rtc.isrunning()) {
Serial.println("RTC is NOT running!");
rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
Serial.println("RTC adjusted!");
}
else {
Serial.println("RTC is running");
}
}
void loop() {
}