Customer:
I bought an RTC module but can’t get it working. Could you send me the libraries and some sample code, plus the connection schematic? I saw it has a built-in temperature sensor, so code for that too would be helpful.
Original message (Croatian)
Kupio sam od vas RTC ali nemogu ja nikako osposobiti. Dali mi možete Poslat bibliotke za njega i nekakve probne kodove, i šemu spajanja. Koliko sam vidio ima ugrađen i temperaturnu senzor pa i kodove za njega
Hvala
Poslano s mojeg iPhonea
Originally submitted via email support on 15 February 2016. Migrated to the forum for community visibility.
Soldered Support:
Which RTC model do you have - DS1307 or DS3231?
Original message (Croatian)
Potštovani,
koji model RTC imate DS1307 ili DS3231?
Soldered Support:
I haven’t personally worked with this module. I’ll send you the library and sample code.
Original message (Croatian)
osobno nisam radio s ovim modulom. Poslati ću Vam library i sample kod do kraja dana.
Soldered Support:
This library works with the module: Rinky-Dink Electronics
For sample code use: File-Examples-DS3231-Arduino-Easy
When you open the Serial Monitor, remember to set the BAUD rate to 115200. If you’re using the RTC with a battery and just want to set the time, you can use this code:
#include
DS3231 rtc(SDA, SCL);
void setup()
{
rtc.begin();
rtc.setDOW(WEDNESDAY); // day
rtc.setTime(0, 0, 0); // hour, minute, second
rtc.setDate(1, 1, 2016); // month, day, year
}
Original message (Croatian)
provjereno ovaj library radi uz modul: Rinky-Dink Electronics
za sample kod koristite: File-Examples-DS3231-Arduino-Easy
Kada pokrenete serial Monitor ne zaboravite postaviti BAUD rate na 115200. Ako RTC koristite s baterijom i želite samo postaviti vrijeme možete koristiti ovaj kod:
#include
DS3231 rtc(SDA, SCL);
void setup()
{
rtc.begin();
rtc.setDOW(WEDNESDAY); // dan
rtc.setTime(0, 0, 0); // sat, minuta, sekunda
rtc.setDate(1, 1, 2016); //mjesec, dan, godina
}