London
Offline
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #15 on: January 12, 2010, 06:57:27 pm » |
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
Newbie
Karma: 0
Posts: 20
Arduino rocks
|
 |
« Reply #16 on: January 13, 2010, 05:35:59 pm » |
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
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #17 on: January 13, 2010, 07:39:44 pm » |
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
Newbie
Karma: 0
Posts: 6
Arduino rocks
|
 |
« Reply #18 on: January 14, 2010, 07:40:53 am » |
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
Newbie
Karma: 0
Posts: 7
Arduino rocks
|
 |
« Reply #19 on: January 15, 2010, 08:09:14 am » |
Is there an example somewhere of this library running an alarmed event?
|
|
|
|
|
Logged
|
|
|
|
|
London
Offline
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #20 on: January 15, 2010, 08:15:24 am » |
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
Newbie
Karma: 0
Posts: 7
Arduino rocks
|
 |
« Reply #21 on: January 16, 2010, 12:07:02 am » |
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
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #22 on: January 16, 2010, 03:21:15 am » |
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
Newbie
Karma: 0
Posts: 3
Arduino rocks
|
 |
« Reply #23 on: January 18, 2010, 07:52:11 am » |
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
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #24 on: January 18, 2010, 08:17:18 am » |
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
Newbie
Karma: 0
Posts: 7
Arduino rocks
|
 |
« Reply #25 on: January 19, 2010, 12:43:50 am » |
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. 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! 
|
|
|
|
|
Logged
|
|
|
|
|
London
Offline
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #26 on: January 19, 2010, 03:10:35 am » |
Glasshopper, good to hear you found the library useful
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
Newbie
Karma: 0
Posts: 10
Arduino FTW!
|
 |
« Reply #27 on: January 20, 2010, 01:27:46 pm » |
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
Newbie
Karma: 0
Posts: 20
Arduino rocks
|
 |
« Reply #28 on: January 20, 2010, 01:52:19 pm » |
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
Faraday Member
Karma: 6
Posts: 6226
Have fun!
|
 |
« Reply #29 on: January 20, 2010, 01:58:40 pm » |
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
|
|
|
|
|
|