Chronodot is driving me chrono crazy
Moderators: adafruit_support_bill, adafruit

Chronodot is driving me chrono crazy

by Psorophora on Fri May 25, 2012 9:03 am

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?
It's all fun and games until someone...
User avatar
Psorophora
 
Posts: 5
Joined: Thu May 24, 2012 12:49 pm
Location: 141 New Jersey, 21 in the air, 203 Africa

Re: Chronodot is driving me chrono crazy

by adafruit_support_rick on Sat May 26, 2012 2:40 pm

What string are you using to set the time?

adafruit_support_rick
 
Posts: 13757
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Chronodot is driving me chrono crazy

by Psorophora on Sat May 26, 2012 4:14 pm

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
It's all fun and games until someone...
User avatar
Psorophora
 
Posts: 5
Joined: Thu May 24, 2012 12:49 pm
Location: 141 New Jersey, 21 in the air, 203 Africa

Re: Chronodot is driving me chrono crazy

by adafruit_support_rick on Sat May 26, 2012 5:21 pm

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?

adafruit_support_rick
 
Posts: 13757
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Chronodot is driving me chrono crazy

by Psorophora on Sun May 27, 2012 10:44 am

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?
It's all fun and games until someone...
User avatar
Psorophora
 
Posts: 5
Joined: Thu May 24, 2012 12:49 pm
Location: 141 New Jersey, 21 in the air, 203 Africa

Re: Chronodot is driving me chrono crazy

by adafruit_support_rick on Sun May 27, 2012 10:50 am

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 | TOGGLE FULL SIZE
/*  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

adafruit_support_rick
 
Posts: 13757
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Chronodot is driving me chrono crazy

by Psorophora on Sun May 27, 2012 11:28 am

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.
It's all fun and games until someone...
User avatar
Psorophora
 
Posts: 5
Joined: Thu May 24, 2012 12:49 pm
Location: 141 New Jersey, 21 in the air, 203 Africa

Re: Chronodot is driving me chrono crazy

by adafruit_support_rick on Sun May 27, 2012 12:55 pm

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

adafruit_support_rick
 
Posts: 13757
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Chronodot is driving me chrono crazy

by adafruit on Mon May 28, 2012 5:45 pm

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
User avatar
adafruit
 
Posts: 11740
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: Chronodot is driving me chrono crazy

by halifaxx on Fri Dec 07, 2012 5:15 am

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
halifaxx
 
Posts: 1
Joined: Fri Dec 07, 2012 4:47 am

Re: Chronodot is driving me chrono crazy

by odometer on Mon Dec 17, 2012 12:39 am

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.)
odometer
 
Posts: 98
Joined: Sun Aug 21, 2011 11:01 pm