I have a Chronodot RTC running with an Arduino YUN.
The code below when uploaded produces 2014 as expected
#include <Wire.h>
#include "RTClib.h"
RTC_Millis RTC;
void setup () {
Serial.begin(57600);
RTC.adjust(DateTime(__DATE__, __TIME__));
}
void loop () {
DateTime now = RTC.now();
Serial.println(now.year(),DEC);
delay(1000);
}
If I now rem out the RTC.adjust line, upload and upload the sketch the result is 2106. I've tried variation of powering down the Chronodot but nothing seems to work.
The battery is installed and and the YUN is being powered over USB
I'm missing something but I don't see what. Any help would be much appreciated - thanks
Chronodot and YUN
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23940
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Chronodot and YUN
You have a battery in the chronodot?
-
- Posts: 4
- Joined: Fri Jun 06, 2014 10:37 am
Re: Chronodot and YUN
Hi there,
Yes the battery is installed and I checked the voltage before I installed it.
Yes the battery is installed and I checked the voltage before I installed it.
- adafruit_support_rick
- Posts: 35092
- Joined: Tue Mar 15, 2011 11:42 am
Re: Chronodot and YUN
please post a picture of your connections between the yun and the chronodot
-
- Posts: 4
- Joined: Fri Jun 06, 2014 10:37 am
Re: Chronodot and YUN
I've got it wored as follows:
Chrono SCL to YUN SCL (pin next to Ethernet socket)
Chrono SDA to YUN SDA (next pin down from the above)
Chrono VCC to YUN 5V
Chrono GND to YUN GND
Battery installed
YUN powered through USB
Cheers
Chrono SCL to YUN SCL (pin next to Ethernet socket)
Chrono SDA to YUN SDA (next pin down from the above)
Chrono VCC to YUN 5V
Chrono GND to YUN GND
Battery installed
YUN powered through USB
Cheers
-
- Posts: 12151
- Joined: Thu Apr 06, 2006 4:21 pm
Re: Chronodot and YUN
we have alerted the maker of the product (macetech) to review this post & advise.
thank you,
adafruit support
thank you,
adafruit support
- macegr
- Posts: 293
- Joined: Fri Apr 04, 2008 4:46 pm
Re: Chronodot and YUN
Your code does not use the external RTC at all. RTCmillis would be a (fairly inaccurate) clock source based on the AVR's oscillator. You should start from the RTClib example code involving the DS1307 (which works much like the ChronoDot). The only change would be to remove the test for rtc.isrunning because others have said that it doesn't work on the DS3231.
-
- Posts: 4
- Joined: Fri Jun 06, 2014 10:37 am
Re: Chronodot and YUN
Many thanks
I'll give that a go
I'll give that a go
Please be positive and constructive with your questions and comments.