Giter VIP home page Giter VIP logo

rtclib's Introduction

Original code from JeeLabs http://news.jeelabs.org/code/

forked by Adafruit

and then forked by me... rlameiro :D

Now forked, enhanced, and mutilated by me xxxajk.


What's new:

* Preliminary Teensy 3.0 RTC support. Please test!

* AVR:
  All the standard libc time functions are available.
  Epoch is 1/1/1900.
  time_t is an int64_t and does not have the January 19, 2038 overflow problem.
  I2C is protected by xmem's multitasking lock if you use multitasking.
  If you are missing the DS1307 chip, the library automatically reverts to
  using the software millis RTC which is only good for ~49 days.

* You no longer have to 'start' RTC with begin.

* You do not have to declare that you use any particular RTC.

* There are 3 simplified functions for using the entire RTC library.
        Set the time
                RTCset(const DateTime& dt);
        Get the current time
                DateTime RTCnow();
        Find out if RTC is hardware.
                boolean RTChardware(void);

* DS1307 specifics:
  Read and write to DS1307 scratch memory is available, as is the
  SqwPinMode setting.

TO-DO:
       Make a unified access method to RTC specific features, such as:
         * Access to RTC memory
         * Access to RTC PIN features

Notes for DS1307 users in the far future:
  In the year 2100 you will have to get a new DS1307 and adjust the software,
  because the DS1307 is only good to the year 2099. :-)

Notes for Teensy 3.0 users on and after January 19, 2038:
  time_t in the libc is only 32 bits.
  The date restarts at December 13, 1901 due to an overflow.
  Please complain to GNU and the developers of libc about it.
  For details about this problem, please see:
    http://en.wikipedia.org/wiki/Year_2038_problem

rtclib's People

Contributors

xxxajk avatar ladyada avatar dmalec avatar rlameiro avatar paintyourdragon avatar jpbot avatar hecko avatar

Watchers

Lexi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.