Any luck with finding a solution for this? I am having same problem with the RTC from Adafruit. Works until I mounted the Wifi 101, checked battery and it was fine. Removed the Wifi 101, hooked back up the Uno alone and the RTC works fine.
Uno Rev 3
Arduino Software 1.6.5.
DS1307 Real Time Clock Breakout Board Kit from Adafruit
RTC SDA connect to Uno analog pin 4, SCL connected to analog pin 5
Tested battery
Power by 5v from Uno hooked to USB only then added power supply to Uno.
Here is what I did using the code provided by Adafruit, hooked RTC to Uno, it functions with no problem.
Mounted the Wifi 101 to the Uno and hooked RTC to Wifi 101 A4 and A5. 5v from Wifi 101 5v header. Ground from Wifi 101 ground
RTC did not work.
Checked battery it was fine, plugged power adapter into Uno, checked all connections, still nothing.
Hooked up I2C FRAM breakout board from Adafruit to Wifi101 A4 and A5, loaded Adafruit code only, I2C FRAM functions with no problem.
It just appears to be some issue with the RTC while on the Wifi 101
This is the code used from Adafruit:
// Date and time functions using a DS1307 RTC connected via I2C and Wire lib
#include <Wire.h>
#include "RTClib.h"
RTC_DS1307 RTC;
void setup () {
Serial.begin(57600);
Wire.begin();
RTC.begin();
if (! RTC.isrunning()) {
Serial.println("RTC is NOT running!");
// following line sets the RTC to the date & time this sketch was compiled
RTC.adjust(DateTime(DATE, TIME));
}
}
void loop () {
DateTime now = RTC.now();
Serial.print(now.year(), DEC);
Serial.print('/');
Serial.print(now.month(), DEC);
Serial.print('/');
Serial.print(now.day(), DEC);
Serial.print(' ');
Serial.print(now.hour(), DEC);
Serial.print(':');
Serial.print(now.minute(), DEC);
Serial.print(':');
Serial.print(now.second(), DEC);
Serial.println();
Serial.print(" since 1970 = ");
Serial.print(now.unixtime());
Serial.print("s = ");
Serial.print(now.unixtime() / 86400L);
Serial.println("d");
// calculate a date which is 7 days and 30 seconds into the future
DateTime future (now.unixtime() + 7 * 86400L + 30);
Serial.print(" now + 7d + 30s: ");
Serial.print(future.year(), DEC);
Serial.print('/');
Serial.print(future.month(), DEC);
Serial.print('/');
Serial.print(future.day(), DEC);
Serial.print(' ');
Serial.print(future.hour(), DEC);
Serial.print(':');
Serial.print(future.minute(), DEC);
Serial.print(':');
Serial.print(future.second(), DEC);
Serial.println();
Serial.println();
delay(3000);
}