// simple read and write to internal eeprom// by Kristian Gohlke / kr1 <http://filformat.net>//// reads or writes data to the eeprom and prints it to the screen// the stored data is preserved even when the boards power connection is unplugged// so you could think of the eeprom as arduinos amazing 512byte harddrive// useful for storing the last few bytes of data from a sensor or to keep config settings //// try storing some data to your eeprom unplug the boards power supply and relax// get back to it some days later to find your data lying there waiting for you untouched//// created 13 August 2006// (cleft) 2006 Kristian Gohlke

#include <avr/eeprom.h>

byte e_in; //holds the value to be written to the eeprombyte e_out; //holds the value that is read from the eeprom

//the adress inside the eeprom to write to//the eeprom can hold 512 bytes, so the adress space is from 0 to 511unsigned int addr = 0;