Introduction: Save Values in Your Arduino's Permanent Memory

********************Although the Arduino Code works fine, Some Info in this Instructable is not "Entirety" correct , please also read the comments**********************

This is a really short instructable, I never knew you could do this, actually I assumed that its not possible, until I recently found that I was wrong, So I thought of sharing this with you.

The arduino has 512 memory address spaces where you can write data to, This means you can write a string of 512 characters to it. You basically write an ASCII Character's ASCII Decimal value to it.

The arduino IDE comes standard with a EEPROM library.

All you you have to do is include it.

#include <EEPROM.h>

Then simply write your value to it.
Say I want to write my name to the Arduino's EEPROM.
I would convert each character in my name "MARTIN" to ASCII Decimal values.
I.E

M = 77<br>A = 65
R = 82
T = 84
I = 73
N = 78
void setup()<br>{
//EEPROM.write(ADDRESS,VALUE);<br>int MyVal=255;
	EEPROM.write(0,77);<br>	EEPROM.write(1,65);
	EEPROM.write(2,82);<br>	EEPROM.write(3,84);<br>	EEPROM.write(4,73);<br>	EEPROM.write(5,78);
}

Step 1: Read the Values From Memory

You can then simply read the values again using a for loop
Try this after you switched off the Arduino and on again. It will print your saved values to the Serial Monitor
If you want, check out this thread

http://techtinker.co.za/viewtopic.php?f=23&t=16

Its got some more detail about ASCII codes if you are not familiar with it.

#include <EEPROM.h><br>int MemoryAddr=0;<br>int Value=0;<br>void setup()<br>{<br>Serial.begin(38400);<br>}<br>
void loop()<br>{
  
  for (int MemoryAddr=0; MemoryAddr <= 5; MemoryAddr++) 
  {
  value = EEPROM.read(MemoryAddr);
  char MyCharacter = char(value);
  Serial.println(MyCharacter);  
  }  
 delay(5000); 
}