Save data into program memory

Hi, i have a clock project in which you have to insert some data at some point, this data is saved into the flash memory as a string of 130 ints, well my question is how can i do to save it into program memory or something not volatile so i can acsess it later? thanks

Program memory is locked so you can't save it in there. You can, however, save it into EEPROM.

Thanks for answering. I've read something about it, but i didn't get it clear enough, could you explain me how to do it?

Rggmiranda:
Thanks for answering. I've read something about it, but i didn't get it clear enough, could you explain me how to do it?

The wonderful Arduino developers have blessed us with example code that already demonstrate how to do it.

Ok, thanks for goggling it for me, but i have already done that, still i don't understand how to use it well, in every example code it saves data in void setup(), in my case i need to do it at a certain point of the program, to be more precise, the user introduces some values into the arduino by pressing some buttons, after that, arduino saves it so it doesn't wipe if it turns off

in every example code it saves data in void setup()

"setup()" is just a function, like "loop()" or "analogRead()" or...

Perhaps if you posted your code and indicated where you want to do this? The small examples might do it in setup, but you just move the place where you save to EEPROM. And you would read back the last value, in setup, when you start up next time.

Before you get too far you should be aware that the EEPROM has a finite life and will eventually wear out if you keep writing to it. Normally that wouldn't be a problem, but if you make a mistake in your sketch and end up writing to EEPROM very frequently then you could wear it out within minutes. So before you start testing, think carefully about the design of your sketch to make sure it won't do repeated writes by mistake.