Hey everyone, I am having a very strange issue with the realtime clock in Arduino that I cannot seem to solve. Basically, I have a program that logs data from a terrarium kit and saves each session to an SD card as a file named after the time the program started. 0
The problem with the program is that the code hangs on the statement before the setup section: “DateTime now = RTC.now().” The realtime clock appears to be functioning correctly with the example program which makes this issue even more strange. I am unsure if this is purely a software or hardware issue. From scouring the internet, I have found people with a similar problem to mine where the RTC will freeze up the i2c bus on the Arduino. However, I am unsure whether this is the issue plaguing me. If this is indeed the issue plaguing my program, unsure of how to work around it. I found an online solution here, however my program freezes upon launch so this would not work for me.
So far, I have tried:
-Replacing the coin-cell battery in the realtime clock (I am using 3 volt batteries)
-Replacing the datalogger shield with a new one
-Replacing the Arduino with a new one
-Checking to make sure that the jumpers were correctly soldered to the datalogger shield (Adafruit support checked mine through images and said they looked good)
I am running this program on IDE Version 1.6.9 with a program with the newer Adafruit datalogger shield on the Arduino Mega.
Any help would be greatly appreciated
Code: [code]//The libraries we need for our terrarium kit//Download and install them - Pastebin.com (Too long to post)