i just want to make sure before i switch my RTC to the DS3231 that my code will still work for my feeder. Currently using the DS1307 which i have been less than thrilled about. Seems as if its constantly loosing the time.
when i just made the switch i get these errors....
Arduino: 1.7.7 (Windows 7), Board: "Arduino Uno"
FINAL___.ino: In function 'void setup()':
FINAL___.ino:30:7: error: 'class DS3232RTC' has no member named 'begin'
FINAL___.ino:31:13: error: 'class DS3232RTC' has no member named 'isrunning'
FINAL___.ino:34:9: error: 'class DS3232RTC' has no member named 'adjust'
FINAL___.ino: In function 'void loop()':
FINAL___.ino:40:22: error: 'class DS3232RTC' has no member named 'now'
Error compiling.
If you are familiar with RTClib.h there is no need to stop using it, an you can treat the DS3231 as if it were a DS1307.
If you want a library which can easily address more of the capabilities of the DS3231, like the Alarms, I would suggest Jack Christensens library for the DS3231/DS3232.
The Christensen library has different syntax than RTClib, and is similar to the standard Margolis library for the DS1307.
which RTC is better the DS3231 or DS3232? i know they minor differences between the two, i just can't make my mind up on which one i should use, if it even really matters at all......... i just want to get rid of this DS1307 for good!
which RTC is better the DS3231 or DS3232? i know they minor differences between the two, i just can't make my mind up on which one i should use, if it even really matters at all......... i just want to get rid of this DS1307 for good!
The DS3231 has the same features as the DS3232 except: (1) Battery-backed SRAM, (2) Battery-backed 32kHz output (BB32kHz bit in Control/Status register 0x0F), and (3) Adjustable temperature sensor sample rate (CRATE1:0 bits in the Control/Status register).
There is no difference in the time keeping. The DS3231 is less expensive and readily available, but there are probably pirate versions and out of spec chips in some of the lowest cost ebay modules. I've not had problems with the modules labeled ZS-042.
while were on the subject, do you think my coding looks fine? i cant help but think im not clearing something or that i forgot some sort of code to make the RTC sync time properly, im afraid i'll get the DS3231 and have the same problems i am having now, which is that they initial time syncing is off by about a minute....
if (! RTC.isrunning())
{
lcd.println("RTC NOT Running!");
RTC.adjust(DateTime((__DATE__), (__TIME__)));
}
Because the RTC is running, you are never actually resetting it to the compile time, and it is likely to be getting further away from your computer time. Setting with the computer time will always be a few seconds late, because of the compile time, upload time, and the reset when opening the monitor.
Get rid of the conditional test, and just set the RTC to compile time once. Then comment out the line in our sketch.
{
RTC.adjust(DateTime((__DATE__), (__TIME__)));
}
To be more precise, you will need to use one of the other forms of RTC.adjust like
The DS3231 doesn't have the CH (clock halt) flag which is found on the DS130x. And it is this flag that is tested with the isRunning function. So don't use isRunning with the DS3231!
When i upload this code to the arduino, it seems that any time i use the reset button the time resets to when it was uploaded, it also resets when the arduino is unplugged which is not good for my project. I thought that the code was written so that it would keep the time when unplugged.....
So if I want to unplug the arduino and still have the time be accurate upon power up. What would has to be in the code. Because the first code allows it to be powered down and back up with the time being kept. However it is just inaccurate time to begin with. Now I have accurate times that don't allow me to move the arduino without fear of unplugging and having to reupload the code