I wanted to know if you any of you guys knew how to tell time on an Arduino. I found a Time Library for Arduino but that syncs with your computer. Is there a way I can keep track of time including the date using Arduino without the use of a computer? If you have any code examples it will be much appreciated...
what about using the DS1307 Real time clock (RTC) chip.
Search the Arduino+DS1307 you can find a lot of post with code even the library. ;D
As ITead says, you need a Real Time Clock (RTC) chip. You'll also need an appropriate crystal and you'll probably want a 1.5v button cell so it keeps time when you turn the power off.
I got an RTC kit which contained the RTC chip, chip socket and crystal, but they don't have it on stock where I got it any more. I got a 1.5v battery and battery hodler from somewhere else.
There are plenty of exmaple circuits/sketches out there for it, including in the playground here.
Do you guys think this will help?
If you want, I have some boards I made pm me if you're interested...
You don't NEED an RTC.
Check out the Time library:
It provides an easy to use API for timekeeping.
In general, there are basically three choices for how to keep track of time:
1) Internal (using the millis() counter). Advantage: It's free - requires no additional hardware or connectivity. Disadvantage: It's not very accurate, and non-persistent (if your device powers off, it gets reset). 2) Network, via PC, GPS, or Ethernet connection. Advantage: Accurate, persistent. Disadvantage: Requires a network connection. 3) RTC. Advantages: accurate, persistent. Disadvantage: Requires external hardware (an RTC chip and related components).
The RTC breakout you linked from Sparkfun is certainly one way to get an Arduino "clock" running, but not the only way. And it's a bit pricey for what you get (IMHO). A few other vendors offer DS1307-based RTC breakouts for less, or you can build your own from about $7-8 in components.