Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, a web toolkit designed to help citizens, conservation practitioners, municipal decision-makers, researchers, educators, and students advance knowledge and stewardship of fresh water. New to EnviroDIY? Start here

jremington

  • jremington posted a new activity comment 6 years, 8 months ago

    How do I convince a DS3231 to output seconds since 1/1/2000? I can’t find anything in the DS3231 data sheet describing such a function.

    • If you’re using the DS3231 library, you can use the following code:

      DateTime now = RTC.now(); //get the current date-time
      currentepochtime = (now.get()); //seconds since 1/1/2000

      Look at the “now” example that comes with the DS3231 library to see the whole sketch.