Pages: 1 [2] 3 4 ... 10   Go Down
Author Topic: Time Library added to Playground  (Read 36219 times)
0 Members and 1 Guest are viewing this topic.
London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Skipper, good to hear you have it working.

Catcher, adjustment works by offsetting the time by the given number of seconds. For example, adjustTime(-3600) ;  sets the clock back 1 hour.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

mem ,
The Sw i tried using didnt work for me :-( ( I sent you PM with the problem)
But I manged to get the uFAT runing and reading from my SD!!!
cool
But write doesn't work .. tried two SDs - they are not write protected .. but I cant write to them (only read the stuff I wrote in the file on windows) :-(
any help ? :-[(no errors...)
Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

moriszen,  It sounds like the problem relates to the interface to the SD card rather than something to do with the Time Library. I would like to keep this thread focused on issues relating to the Time library.

Perhaps you can start another  thread for a discussion on getting your SD card going.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey mem,

Just wanted to thank you for writing this library.  I was just sitting down to solve this problem and your library pretty much nailed everything I needed.

It works great.  

J
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there an example somewhere of this library running an alarmed event?

Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is there an example somewhere of this library running an alarmed event?
There is an example in the TimeAlarms directory in the current download.

See this thread for more details: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1263305457
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ahh, thank you!
I guess I had an older version of Time that didn't have TimeAlarms?
« Last Edit: January 16, 2010, 12:07:44 am by Glasshopper » Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I guess I had an older version of Time that didn't have TimeAlarms?
Yes, the  TimeAlarms library was only added recently. Perhaps you can report how you get on with the alarms library in the thread linked above.

Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello !

Is it possibe to run the Time-lib with the NPT Internet Time Sync together with a webserver (e.g. Ben Combees Webduino) ?

I didn't tried it already, but maybe there is somebody who have experiences.

Ollie.
Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I haven't tried it but would expect you could add the relevant code from the NTP example sketch in the download into Bens webduino library.

Bear in mind that NTP uses the UDP protocol so you would need to add the third party UDP library as documented in the NTP example.

If you want to try this, I suggest you get the NTP example sketch running on its own and then consider how you would want to integrate this into webduino.

I would be interested to follow your progress, perhaps create a new thread to cover this specific topic.
« Last Edit: January 18, 2010, 08:20:36 am by mem » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I guess I had an older version of Time that didn't have TimeAlarms?
Quote
Yes, the  TimeAlarms library was only added recently. Perhaps you can report how you get on with the alarms library in the thread linked above.

It was a joy to use!!
your example was simple & thorough enough for me to understand how to use it.

The only confusion I had was timerRepeat is only in seconds and not
formatted like alarmRepeat but it did not take long to figure out time time * 60 to get minutes.

thank you for such a wonderful & versatile library!  smiley-wink
Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Glasshopper, good to hear you found the library useful

Quote
… timerRepeat is only in seconds and not formatted like alarmRepeat …
You should be able to set timers just like alarms, did you try something like :  Alarm.timerRepeat( 1,30,0, TimerTask);   // set timer to repeat every 1 hour and 30 minutes
« Last Edit: January 19, 2010, 03:10:58 am by mem » Logged

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino FTW!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have created a Visual Basic application based on the code from Moriszen.

Here is the link: http://www.megaupload.com/?d=1A76PJ5F
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nice to see you got it posted .
Does anyone know if the time library will work in idle - low power mode .
I want to have an application that wakes up once or twice a day an logs the time and date (running on batteries) .
any suggestions ?
Logged

London
Offline Offline
Tesla Member
***
Karma: 10
Posts: 6255
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The time library relies on the Arduino millis timer which services an interrupt every millisecond. This means it will not work in low power mode.

For an application that needs to wake up once or twice a day you would probably need to use a low power Real Time Clock that generated an interrupt that would wake up the Arduino when it needed to log something. Have a look in the playground to see if anyone has published an RTC application that does something like this.
Logged

Pages: 1 [2] 3 4 ... 10   Go Up
Jump to: