Mermory, how to write to save data for later.

Hello all,

I'm using an Arduino Duemilanove.

I need to save data what is now writing to my COM port via digitalWrite();

but I need to save this.

2 options. First to write it to the onboard memory. Second to write it to external memory.

Anyone who knows to write and save this for both options?

Looking forward,


Depending on how much data you have to store away, the easiest way is using the on chip EEPROM memory (1K bytes for a 328 processor chip. Next easiest is to add external EEPROM chip to your project, using I2C communications. The EEPROM chips are cheap and simple to add if the on chip is not large enough.

You can start by reading up in the STORAGE section of this link:


Hi Lefty,

thanks for the reply. I will check on the link and Arduino website.

At this point I don't know the amount of data I need to store, so that's one to look for.

Second I need to retrieve the data after storage. So maybe with the Processing Tool I can handle that ??????. Any experience with Processing ??????.

Thanks so far, and any further comment of idea is very welcome.


Hi Lefty,

I've been working with the Clear, Write and Read Sketch from the Arduino site and stand-alone it works perfect.

But now. The Read Sketch uses the following code:

int val = analogRead(0) / 4; EEPROM.write(address, val);

address = address + 1; if (address == 1024) address = 0;

What I would like to store in the EEPROM is a temperature value which is set as:

define TEMP 0x21

int temp_in;

void loop () { temp_in = read_register16(TEMP); }

I've tried several options with long, float, etc. but no result.

When I read the EEPROM it gives in all 1024 records a value of 0.

How can I Write a value between 0 and 30 (int value) or so in the EEPROM.

I figured that

define TEMP 0x21

int temp_in;

void loop () { int val = temp_in; EEPROM.write(address, val);

address = address + 1; if (address == 1024) address = 0; }

might work?????

Maybe the int has to be long???? But how to store it in the EEPROM

Looking forward to your help.


The type for the EPROMM.write value is byte not int the address is type int