smz / Arduino-RTCtime

A time.h compliant library that makes using the DS1307 and DS3231 Real Time Clock modules really simple.
10 stars 8 forks source link

RTCtime

An Arduino Real Time Clock library.

This library makes using modules based on the DS1307 and DS3231 RTC really simple. It is compatible with and is meant to leverage the standard C time library <time.h> API (datatypes and functions) as defined in ISO/IEC 9899 (C90) and implemented in the AVR Std C runtime library since version 2.0.0 (available in the Arduino IDE since version 1.6.10).

This work started as a fork of the excelent Rtc by Makuna library, but it has been modified to support the Std C time API, while the original "Rtc by Makuna" uses a proprietary API.

Please note that it is absolutely mandatory to have an underlying standard compliant C time library (time.h) as this library uses data types and functions which are defined there. This probably limits the usefulness of this library to boards based on the AVR architecture for which such a library exists and it makes impossible to use it for architectures for which such a library is not availabe (e.g. the ESP8266 or the Arduino DUE)

Extra features (such as temperature reading, calibration, alarms and memory storage) are available when supported by the underlying hardware.

The SoftwareWire I2C bus library is supported.

Notes

Installation

Install this library using the Arduino IDE (prefered method)

Install this library from GitHub (alternative method)

Examples

Donating

If you like this library and you use it, please consider donating through my PayPal page, thank-you!