Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Reply To: Datalogger build

Home Forums Other Data Loggers Datalogger build Reply To: Datalogger build

#1277
Rick Vogel
Participant

    Brandon,
    I took a look at your code. Not sure why the clock is doing that to you, but Rene could be correct. I’ve not had a clock do that to me before so I couldn’t personally confirm.

    I don’t typically use the RTC library as I only need a couple of functions (set time and get time) so I just put the operations within the main sketch. If you would like to, you can try the modified code attached. just rename the extension from .txt to .ino. It is your same code just modified to use the clock structure as I do. It didn’t look like you were pulling anything else from the clock either. I use a DS3231(chronodot setup), but the 1307 is the same address I believe.

    I’m not sure how the library you had performs the time setting but this adds an option for you to send a time update to the sketch over the serial port whenever you like. Its explained at the top of the sketch.

    Attachments: