Chronodot is driving me chrono crazy

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
Psorophora
 
Posts: 5
Joined: Thu May 24, 2012 12:49 pm

Chronodot is driving me chrono crazy

Post by Psorophora »

Here's the story, I got an Arduino Uno R3 a couple of weeks ago and a chronodot soon after, I'm also running Arduino 1.0 and windows 7 professional. I read something about using com ports below 10 so I have the Arduino on com 2.

I can't change the time. Using the serial monitor I can see the time elapsing I can also see temp in C and F I just can't set the time.

I've tried using the sketch for the Chronodot and TimeRTCSet and no luck. Everything compiles fine. When teh battery is inserted into the Chronodot time starts at 2000/01/01 00:00:00 and continues. It keeps time just fine, since last reset the time and date are now 2000/01/02 02:37:40 temp is 21C 70F.

Using example sketches I can get the SHT15 to work, as well as the BMP085 and the TSL2561.

Any ideas?

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

Re: Chronodot is driving me chrono crazy

Post by adafruit_support_rick »

What string are you using to set the time?

Psorophora
 
Posts: 5
Joined: Thu May 24, 2012 12:49 pm

Re: Chronodot is driving me chrono crazy

Post by Psorophora »

Hi there,

I downloaded the library from
https://github.com/Stephanie-Maks/Arduino-Chronodot
it uses:
RTC.adjust(DateTime(__DATE, __TIME));

and for TimeRTCSet that sketch uses:
RTC.set(t);
SetTime(t);

I'm totally new at this. I thought it would be fun to learn something new while I'm away at work.

Thanks,
John

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

Re: Chronodot is driving me chrono crazy

Post by adafruit_support_rick »

I found a sketch called TimeRTCSet here:
http://www.arduino.cc/playground/uploads/Code/Time.zip
Is that the one you're using? If so, what string are you typing into it to set the time?

Psorophora
 
Posts: 5
Joined: Thu May 24, 2012 12:49 pm

Re: Chronodot is driving me chrono crazy

Post by Psorophora »

Yes that is where I got TimeRTCSet from, and please keep in mind that I'm new to this and may have bitten off more that I can chew.

I was under the impression that "RTC.set(t);" set the RTC and system time given the comment in the code?

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

Re: Chronodot is driving me chrono crazy

Post by adafruit_support_rick »

Yes, but you have to tell it what time it is. The sketch is expecting you to type the current time into the serial monitor. It wants a string consisting of a 'T" followed by 10 ascii digits representing the current UNIX time.

Code: Select all

/*  code to process time sync messages from the serial port   */
#define TIME_MSG_LEN  11   // time sync to PC is HEADER followed by unix time_t as ten ascii digits
#define TIME_HEADER  'T'   // Header tag for serial time sync message

Psorophora
 
Posts: 5
Joined: Thu May 24, 2012 12:49 pm

Re: Chronodot is driving me chrono crazy

Post by Psorophora »

Thank you for your patience. I understand it now.

I may have another question regarding the Chronodot library but before I ask I'm going to take a deep breath and read everything a little more slowly.

Really, thank you.

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

Re: Chronodot is driving me chrono crazy

Post by adafruit_support_rick »

No problem.
The comment is not very well written. I can certainly see how it could be misleading.

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

Re: Chronodot is driving me chrono crazy

Post by adafruit »

the best place to get any support for the chronodot is at macetech.com - thats the maker & supplier of the 'dots and he provides tech support for them

halifaxx
 
Posts: 1
Joined: Fri Dec 07, 2012 4:47 am

Re: Chronodot is driving me chrono crazy

Post by halifaxx »

Frustrating problems trying to set the time on chronodot. Used the Adafruit library example which relied on RTC.adjust(DateTime(__DATE__, __TIME__)

Kept setting the clock to 2000/01/01.

Finally dawned on me the RTC.adjust statement in the setup was enclosed in
if (! RTC.isrunning()) {
Serial.println("RTC NOT running");
RTC.adjust(DateTime(__DATE__, __TIME__));
}

This statement says you can only adjust the chronodot if it is not running. If it is not running how can you adjust it?

Move the RTC.adjust out of the if block. Compile and upload the sketch. It will adjust the time of the chronodot in the set up.

Chronodot is then set so move on to your sketch that requires the current time.

The time set will be what you computer believes it to be at some point during the compilation process plus time taken to upload and the set up to run. i.e. possibly a minute out

odometer
 
Posts: 98
Joined: Sun Aug 21, 2011 11:01 pm

Re: Chronodot is driving me chrono crazy

Post by odometer »

I think it would make life a lot easier if the date and time were set at the factory. But then, there would be these things called "time zones" and "daylight saving time" to deal with.

The Chronodot uses a simplistic timekeeping system. It has no support whatsoever for Daylight Saving Time or different time zones. Even if you intend to use the device only in a single time zone, you still cannot just "set it and forget it": you still have to have some means of setting the time for when Daylight Saving Time changes happen. As for the Arduino Time library, it too utterly ignores the existence of time zones and Daylight Saving Time. (Its implementation of Unix time conflates local time with UTC and is thus flawed.)

If whatever device you intend to use this thing in allows you to set the Chronodot's date and time, then you really have no problem. Otherwise, you need a Daylight Saving Time implementation. (Unless you intend to stick to UTC or something... but chances are, you don't.)

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

Return to “Arduino”