Search wiring.org.co:

This example is for Wiring version 0024+. If you have a previous version, use the examples included with your software. If you see any errors or have comments, please let us know.

EEPROM store data by BARRAGAN
Demostrates how to store data in the EEPROM

    #include <WEEPROM.h>

    char val;

    void setup() {
      if(EEPROM.read(5) != 'H') {  // If an H hassn't been stored before
        // in the EEPROM address 5
        EEPROM.write(5, 'H');  // store an 'H' in EEPROM address 5
      }
      val = EEPROM.read(5);    // read value stored in EEPROM address 5

        pinMode(48, OUTPUT);
    }

    void loop() {
      if( val == 'H' )  // if val is 'H' then turon ON the onboard LED (pin 48)
      {
        digitalWrite(48, HIGH);
      }
      delay(100);
    }