Chronodot and YUN

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
NCASbarbara
 
Posts: 4
Joined: Fri Jun 06, 2014 10:37 am

Chronodot and YUN

Post by NCASbarbara »

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

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: Chronodot and YUN

Post by Franklin97355 »

You have a battery in the chronodot?

NCASbarbara
 
Posts: 4
Joined: Fri Jun 06, 2014 10:37 am

Re: Chronodot and YUN

Post by NCASbarbara »

Hi there,

Yes the battery is installed and I checked the voltage before I installed it.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Chronodot and YUN

Post by adafruit_support_rick »

please post a picture of your connections between the yun and the chronodot

NCASbarbara
 
Posts: 4
Joined: Fri Jun 06, 2014 10:37 am

Re: Chronodot and YUN

Post by NCASbarbara »

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

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: Chronodot and YUN

Post by adafruit »

we have alerted the maker of the product (macetech) to review this post & advise.

thank you,
adafruit support

User avatar
macegr
 
Posts: 293
Joined: Fri Apr 04, 2008 4:46 pm

Re: Chronodot and YUN

Post by macegr »

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.

NCASbarbara
 
Posts: 4
Joined: Fri Jun 06, 2014 10:37 am

Re: Chronodot and YUN

Post by NCASbarbara »

Many thanks

I'll give that a go

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”