Installing a Time library

Hi, I am very new to arduino and to programming in general.

I want to program my arduino to know what time it is and potentially display the time on an LCD.

I believe I need to install a time library, but the ones I have found have all given me issues, even to the point of having one called DateTime.h, which I can add through the Sketch>Include Library command, but then I get the 'exit status 1' compiling error.

Can anyone please explain how I can do this? I use a MAC and am having a very difficult time getting any new libraries.

Thank you to anyone who can provide some help!

Start here: Software DateTime Library

That page sends you here: Arduino Time Library

And that page redirects you to this page: Time Library by Michael Margolis

The Time library page linked above references this update: PaulStoffregen/Time

You can use ANY of the libraries listed, but pick one and stick with it. I use the Margolis library, but am exploring the others.

Install libraries according to the instructions on this page: Installing Additional Arduino Libraries

Come back and ask specific questions if you get stuck.

I want to program my arduino to know what time it is

How accurate does the timekeeping need to be ? An Arduino by itself does not make a very good clock over a period.

UKHeliBob: How accurate does the timekeeping need to be ? An Arduino by itself does not make a very good clock over a period.

Hi Bob. I consider this to be the biggest flaw in the physical design of the Arduino board. If the Designers had used a crystal on the 328 chip, it would be a superb clock! I make a lot of clocks, and I either use an ATTiny with a crystal, or an external RTC. RTC sub-boards with the DS3231 are great. I have 3 Chronodots that go for months before being off by more than a second or two, but there are cheaper boards that work just as well. I like 'em because they are round.

So ... any thoughts on why Arduino UNOs don't have a crystal on the processor? Clocks are a popular projects (as well as useful in all sorts of practical uses.)

ChrisTenone: Hi Bob. I consider this to be the biggest flaw in the physical design of the Arduino board. If the Designers had used a crystal on the 328 chip, it would be a superb clock! I make a lot of clocks, and I either use an ATTiny with a crystal, or an external RTC. RTC sub-boards with the DS3231 are great. I have 3 Chronodots that go for months before being off by more than a second or two, but there are cheaper boards that work just as well. I like 'em because they are round.

So ... any thoughts on why Arduino UNOs don't have a crystal on the processor? Clocks are a popular projects (as well as useful in all sorts of practical uses.)

Probably because the resonator can survive reflow soldering, whereas a crystal can't and thus requires hand or wave soldering.

But a crystal on the processor clock still isn't temperature compensated.

BobEng: Hi, I am very new to arduino and to programming in general.

I want to program my arduino to know what time it is and potentially display the time on an LCD.

I believe I need to install a time library, but the ones I have found have all given me issues, even to the point of having one called DateTime.h, which I can add through the Sketch>Include Library command, but then I get the 'exit status 1' compiling error.

Can anyone please explain how I can do this? I use a MAC and am having a very difficult time getting any new libraries.

Thank you to anyone who can provide some help!

I tried using the installer at first, but gave up when it failed. I discovered that manual installation is usually so easy, it's not even worth using. You just place the library folder in the libraries folder and sometimes rename it. There are better descriptions of this around. I believe there are instructions around the site somewhere.