Go Down

Topic: Library for DS1307 Real Time Clock (Read 39 times) previous topic - next topic

mattt


No you can remove byte data[56], it's not used.

Federico

What's the meaning of this part of the code?

Code: [Select]

for(int i=0; i<56; i++)
 {
 RTC.set_sram_byte(i+64,i);
 }


And... Is there someone that can give me an example on how to program an alarm?

Last thing.. for setting up the base time, we have to set the rtc, but there is a delay between the time that I write and the time of setting, as the arduino needs a couple of seconds for compiling the code... someone knows a more professional method to set up the rtc, instead of guessing the time needed to compile?

Thanks, Fede
Federico - Sideralis
Arduino &C: http://www.sideralis.org
Foto: http://blackman.amicofigo.com

kg4wsv

Quote
for setting up the base time, we have to set the rtc, but there is a delay between the time that I write and the time of setting, as the arduino needs a couple of seconds for compiling the code... someone knows a more professional method to set up the rtc, instead of guessing the time needed to compile?

Put a future time in the code, and have the sketch a) print the time, and b) use Serial.available() to wait for a character transmission to actually initiate the clock set.  That's how I did it, anyway.

-j


mattt

#78
Jun 04, 2009, 01:43 pm Last Edit: Jun 04, 2009, 01:43 pm by mattt Reason: 1
I had a pde which listened to the serial input and looked for the following sequences, and set the clock accordingly.
Snn
Mnn
Hnn
Dddmmyy

I can;t find my pde :(
Not hard to write though.

Federico

If you find it, it will be appreciated ;)
Oh, and thanks for the library!

Any hint about the alarm? (two or three post above)
Federico - Sideralis
Arduino &C: http://www.sideralis.org
Foto: http://blackman.amicofigo.com

Go Up