Programming with Time Library

Hi,

I am trying to implement the Arduino Nano (with ATmega 328) in one of my projects. For this, I have attached an FSR Force Sensing Resistor to the Arduino. I currently have a program which outputs a value to the serial monitor corresponding to the force that I push with..

The next step is to have this data time stamped. After playing around with the Time library a little bit, I was wondering if there is any way to store the time data so that every time I disconnect and reconnect power I don't have to input the time again.

If anybody has sample code for this, it'd be much appreciated!

Thanks

I was wondering if there is any way to store the time data so that every time I disconnect and reconnect power I don't have to input the time again.

Sure. Use a real time clock. There is no other way. How would the Arduino know how long it was turned off for?

I'm really new to this- What's a real time clock? Also, is there any way to use the EEPROM to store the time?

What's a real time clock?

An external device with its own battery to keep track of the time.

Also, is there any way to use the EEPROM to store the time?

Well, sure. Then next time you start up, you can resume the clock running where it was when you shut down. Is that what you want?

The RTC (real Time Clock) chips I have used, had a small amount of memory (50 bytes or so) that you can use to keep some critical values across power breaks. It is kept valid by the same battery that the clock uses.