How to write a String in EEPROM

Hi, guys

I try to write a string data to internal EEPROM, but I don't find the way to strore the string data..

[u]code:[/u] String dt[10];

void setup() { } void loop() { dt[1]="123"; dt[2]="202"; dt[3]="252"; dt[4]="108"; dt[5]="880";

EEPROM.write( , ); }

Please help me.. Thanks

Why are you using Strings? Strings consume a lot of resources and fragment the limited memory that you have.

You can't store a String in EEPROM. You can extract the string from the String, using toCharArray(), and then store that string, one character at a time, in EEPROM.

please give me the sample code,,

budiraharjo: please give me the sample code,,

Nope, he never has, never will.

please give me the sample code

You can extract the string from the String, using toCharArray(), and then store that string, one character at a time, in EEPROM.

Much more , and he'd be writing it for you, and that would be no fun for you.

Much more , and he'd be writing it for you, and that would be no fun for you.

It's easy to sit there and say you'd like to have more money. And I guess that's what I like about it. It's easy. Just sitting there, rocking back and forth, wanting that money. - Deep Thoughts by Jack Handy ;)

No, you're going have to explain that quote to this volunteer I'm afraid, zoomkat. (BTW, Wikipedia spells it "Handey")

AWOL: No, you're going have to explain that quote to this volunteer I'm afraid, zoomkat.

Sure, you and the one you defend appear to just want to rock back and fourth and talk rather than post the code you reference. The easy life! Your response seemed to be a "sweet lemon" rationalization for the fact that working code won't be posted. It is what it is.

Easy life?
Nothing easy about teaching - first you have to gauge how much the student knows and wants to learn.

AWOL: Easy life? Nothing easy about teaching - first you have to gauge how much the student knows and wants to learn.

Some teach by preaching, others teach by example. I find providing a working example much more effective. YMMV

These look like numbers. Why not just store an int into EEPROM?

http://arduino.cc/en/Reference/EEPROM

I have to confess I'd never heard of Jack Hand(e)y before, and had to Google him. Wikipedia says he's a "humorist", so I'm guessing it means "humour" in the classical medicine sense of bile and phlegm.

@budiraharjo, please, code must be enclosed in tags (section 7): http://forum.arduino.cc/index.php?topic=149014.0

Groove: I have to confess I'd never heard of Jack Hand(e)y before, and had to Google him. Wikipedia says he's a "humorist", so I'm guessing it means "humour" in the classical medicine sense of bile and phlegm.

http://www.youtube.com/watch?v=uIWjqrqp2vw