user59221: I'm trying to build a random string, save it to EEPROM as int, then read it back and output it.
If I give it a predefined string then it works fine. But Something is wrong with the random string generator. 
  String output;
  char letter;

  String mystr=""; //"ABCabc123..";
  String characters = "ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz";
  String numbers = "0123456789";
  String other = "<>!.,()?|=&%¤#";

  // add random characters to empty string
  for(int i=0 ; i < 12 ; i++){
    mystr += characters[random(0, characters.length())];
  }
  // add two numbers, one other and two more characters
  mystr += numbers[random(0, numbers.length())];
  mystr += numbers[random(0, numbers.length())];
  mystr += other[random(0, other.length())];
  mystr += characters[random(0, characters.length())];
  mystr += characters[random(0, characters.length())];

  // loop the string and place one character in each EEPROM address
  for(int i=0 ; i < mystr.length() ; i++)
  {
    EEPROM.writeInt( i,mystr[i] );
  }

  // read the string back from EEPROM
  for(int i=0 ; i < 17 ; i++){
    letter = EEPROM.readInt(i);
    output += letter;
  }

If I run the code output will be "H". Every time.
If I use the predefined string "ABCabc123.." then it works correct.  
What am I doing wrong with building the mystr?

user4143: Your first mistake is to use String. Don't. Instead use a char array.
char mystr[18]; // Room for 17 characters plus the NULL terminating character

Your string constants should also be char arrays, not String variables. And better to put them in PROGMEM:
const char characters[] PROGMEM = "ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz";
const char numbers[] PROGMEM = "0123456789";
const char other[] PROGMEM = "<>!.,()?|=&%¤#";

Now filling your target array becomes:
for(int i=0 ; i < 12 ; i++){
  mystr[i] = pgm_read_byte_near(characters + random(0, 50));
}

mystr[12] = pgm_read_byte_near(numbers + random(0, 10));
mystr[13] = pgm_read_byte_near(numbers + random(0, 10));
mystr[14] = pgm_read_byte_near(other + random(0, 14));
mystr[15] = pgm_read_byte_near(characters + random(0, 50));
mystr[16] = pgm_read_byte_near(characters + random(0, 50));
mystr[17] = 0; // Don't forget the NULL...

Your second problem is the use of EEPROM.writeInt and EEPROM.readInt.  Those are for writing integer values, not characters.  Instead just use EEPROM.read and EEPROM.write:
for (int i = 0; i < 17; i++) {
    EEPROM.write(i, mystr[i]);
}

Then to read back:
for (int i = 0; i < 17; i++) {
    mystr[i] = EEPROM.read(i);
}
// And don't forget to terminate the string...
mystr[17] = 0;


59221: <p>I'm trying to build a random string, save it to EEPROM as int, then read it back and output it.<br>
If I give it a predefined string then it works fine. But Something is wrong with the random string generator. </p>

<pre><code>  String output;
  char letter;

  String mystr=""; //"ABCabc123..";
  String characters = "ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz";
  String numbers = "0123456789";
  String other = "&lt;&gt;!.,()?|=&amp;%¤#";

  // add random characters to empty string
  for(int i=0 ; i &lt; 12 ; i++){
    mystr += characters[random(0, characters.length())];
  }
  // add two numbers, one other and two more characters
  mystr += numbers[random(0, numbers.length())];
  mystr += numbers[random(0, numbers.length())];
  mystr += other[random(0, other.length())];
  mystr += characters[random(0, characters.length())];
  mystr += characters[random(0, characters.length())];

  // loop the string and place one character in each EEPROM address
  for(int i=0 ; i &lt; mystr.length() ; i++)
  {
    EEPROM.writeInt( i,mystr[i] );
  }

  // read the string back from EEPROM
  for(int i=0 ; i &lt; 17 ; i++){
    letter = EEPROM.readInt(i);
    output += letter;
  }
</code></pre>

<p>If I run the code output will be "H". Every time.<br>
If I use the predefined string "ABCabc123.." then it works correct.  </p>

<p>What am I doing wrong with building the mystr?</p>
 4143: <p>Your first mistake is to use <code>String</code>. Don't. Instead use a <code>char</code> array.</p>

<pre><code>char mystr[18]; // Room for 17 characters plus the NULL terminating character
</code></pre>

<p>Your string constants should also be char arrays, not <code>String</code> variables. And better to put them in <code>PROGMEM</code>:</p>

<pre><code>const char characters[] PROGMEM = "ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz";
const char numbers[] PROGMEM = "0123456789";
const char other[] PROGMEM = "&lt;&gt;!.,()?|=&amp;%¤#";
</code></pre>

<p>Now filling your target array becomes:</p>

<pre><code>for(int i=0 ; i &lt; 12 ; i++){
  mystr[i] = pgm_read_byte_near(characters + random(0, 50));
}

mystr[12] = pgm_read_byte_near(numbers + random(0, 10));
mystr[13] = pgm_read_byte_near(numbers + random(0, 10));
mystr[14] = pgm_read_byte_near(other + random(0, 14));
mystr[15] = pgm_read_byte_near(characters + random(0, 50));
mystr[16] = pgm_read_byte_near(characters + random(0, 50));
mystr[17] = 0; // Don't forget the NULL...
</code></pre>

<p>Your second problem is the use of <code>EEPROM.writeInt</code> and <code>EEPROM.readInt</code>.  Those are for writing integer values, not characters.  Instead just use <code>EEPROM.read</code> and <code>EEPROM.write</code>:</p>

<pre><code>for (int i = 0; i &lt; 17; i++) {
    EEPROM.write(i, mystr[i]);
}
</code></pre>

<p>Then to read back:</p>

<pre><code>for (int i = 0; i &lt; 17; i++) {
    mystr[i] = EEPROM.read(i);
}
// And don't forget to terminate the string...
mystr[17] = 0;
</code></pre>
