Main centres: | 1-3 business days |
Regional areas: | 3-4 business days |
Remote areas: | 3-5 business days |
This tiny RTC module is based on the clock chip DS1307 which supports the I2C protocol. It uses a Lithium cell battery (CR1225). The clock/calendar provides seconds, minutes, hours, day, date,month, and year information. The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with AM/PM indicator.
Features
Usage
Hardware
Connect this sensor to your Arduino/Crowduino digital pins( D2 for example). Adjust the RT&CDS to change trigger sensitivity and duration of the trigger signal.Set the module as retriggerable or un- retriggerable with the switch, when the H position, the module is retriggerable and is unretrigerred when the switch is in L position.
Programming
You can set Tiny RTC time and get the current time from this module as the following:
// Date and time functions using a DS1307 RTC connected via I2C and Wire lib
#include
#include "RTClib.h"
RTC_DS1307 RTC;
void setup () {
Serial.begin(57600);
Wire.begin();
RTC.begin();
RTC.adjust(DateTime(__DATE__, __TIME__));
}
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(now.hour(), DEC);
Serial.print(':');
Serial.print(now.minute(), DEC);
Serial.print(':');
Serial.print(now.second(), DEC);
Serial.println();
Serial.println();
delay(3000);
}