Giter Site home page Giter Site logo

ds3231's Introduction

DS3231

Improved version of the Arduino library DS3231 Simple example

The orginal example has a builtin flaw in that the DS3231 is initialized to the COMPILE time of the code instead of the actual time.
On my work machine the difference between compilation time and actual execution time can be around 20 seconds.
I have added the possibility of initializing the DS3231 from an NTP server.
Additionally I have added the possibilty of just reading the DS3231 and not initializing it.
At the top of the source file are 2 define's. The user must enable (uncomment) just 1 or neither of these lines.

  • If neither line is uncommented, code that just reads the DS3231 and displays the date/time
  • If COMPILE_TIME_SETUP is uncommented, the DS3231 is initialized to the time that the code was compiled.
  • If NTP_TIME_SETUP is uncommented, the DS3231 is initialized to the actual time the code is executed. Should you choose NTP_TIME_SETUP then you have to modify the lines setting the Daylight Saving Time rules see https://github.com/sstaub/NTP

IDE

This project was developed on PlatformIO, a plugin for Visual Studio Code. Therefore the source file has the cpp suffice. For using with the Arduino IDE rename the main.cpp file to <projectname>.ino

ds3231's People

Contributors

mgaman avatar

Watchers

 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.