WRITES AND READ ARDUINO SERIAL TO EEPROM

// WRITES ARDUINO SERIAL TO EEPROM
//
// do this only once on an Arduino,
// write the Serial of the Arduino in the
// first 6 bytes of the EEPROM

#include <EEPROM.h>
char sID[7] = “CD6484”;

void setup()
{
Serial.begin(9600);
for (int i=0; i<6; i++) {
EEPROM.write(i,sID[i]);
}
}

void loop() {
Serial.println(sID);
}


// READS ARDUINO SERIAL FROM EEPROM
//
// reads the Serial of the Arduino from the
// first 6 bytes of the EEPROM

#include <EEPROM.h>
char sID[7];

void setup()
{
Serial.begin(9600);
for (int i=0; i<6; i++) {
sID[i] = EEPROM.read(i);
}
}

void loop() {
Serial.println(sID);
}