Adjusting the clock in gui
Moderators: adafruit_support_bill, adafruit

Adjusting the clock in gui

by Simpson21 on Mon Jan 21, 2013 4:53 am

I have been playing around with the RTC on the data logging shield v1 using the RTClib library trying to make it able to adjust the time with in a menu on a 20x4 lcd I have found that changing RTC.adjust(DateTime(__DATE__, __TIME__)) with this RTC.adjust(DateTime("Jan 21 2013", "05:05:05") works but I cant find a way to change out whats in the quotes for anything that I can add or subtract from.

If someone has any ideas, hits, tips, or code they could share it would be much appreciated
Simpson21
 
Posts: 8
Joined: Sat Jan 08, 2011 11:19 pm

Re: Adjusting the clock in gui

by adafruit_support_bill on Mon Jan 21, 2013 7:00 am

The DateTime object is what you want. Look at the "dateCalc" example in RTCLib.
User avatar
adafruit_support_bill
 
Posts: 29216
Joined: Sat Feb 07, 2009 9:11 am

Re: Adjusting the clock in gui

by Simpson21 on Mon Jan 21, 2013 2:17 pm

Ah Thank you. I was some how missing that example but a quick redownload of the library set me on the right track.

to share what Im building: I have an old 88 Jeep YJ and had an idea of putting an arduino in it to help control things, upon researching my idea and ways to do it I came acrossed this http://www.edsjunk.net/EdsJunk/Blog/Entries/2011/1/24_arduino_powered_jeep_WRANGLER.html so I started working and coding to come up with a similar end result
Simpson21
 
Posts: 8
Joined: Sat Jan 08, 2011 11:19 pm