user27726: I want to save different values on address 0 and 1 on eeprom I tried to change it but when I put data on address 0 and also put data on address 1 the address 0 change its value stored into random number and vice versa .. Is it possible to change the value of respective address without affecting others .. 
CODE
in the setup
     int eepromSize=EEPROM.length();
      Serial.print("EEPROM found, size=");
      Serial.println(eepromSize);
        // Get the last fade value (as an integer)
      EEPROM.get(0, WATEREQFORN1);
      Serial.print("Last Value N1: ");
      Serial.println(WATEREQFORN1);

      EEPROM.get(1, WATEREQFORN2);
      Serial.print("Last Value N2: ");
      Serial.println(WATEREQFORN2);

The user will input the value that will be save in eeprom i use switch because the user will input like this example .. 100A or 23B 
case 'A':
        Serial.print("Case A got ");
        Serial.println(val);
        WATEREQFORN1 = val;

            EEPROM.put(0, WATEREQFORN1);
            Serial.print("DATA SAVE TO EEPROM");

        break;
      case 'B':
        Serial.print("Case B got ");
        Serial.println(val);
         WATEREQFORN2 = val;
         EEPROM.put(1, WATEREQFORN2);
         Serial.print("DATA SAVE TO EEPROM");

        break;

The problem is, when I change/write value into address 0 and after that change/write also into address 1 the value on address 0 also change into different random numbers.

user313: EEPROM.put() and EEPROM.get() write or read the object you pass them. An int is 2 bytes so that is what they write or read. It sounds like you intended for the functions to only handle 1 byte. In that case, make the your variable's data type something that is 1 byte, such as int8_t; otherwise allocate 2 bytes of EEPROM to each.
Update: 
It works because you had only allocated 1 byte in EEPROM for each variable but you store 2-byte variables. Now you're storing 1-byte variables, which matches your EEPROM allocation.

user3917: The variable names in all upper case is a style problem you should address.  Conventionally, C and C++ programmers use all-upper-case names to designate defined constants or macros.  Contravening that convention can lead to confusion if other people use or maintain the code.  Instead of WATEREQFORN1 consider waterEq1, etc.
The problem of your second value overwriting part of the first in EEPROM is an allocation problem.  Presumably the WATEREQ... variables are multiple bytes in length.  EEPROM.get() and put() read and write data types with multiple bytes using several consecutive bytes of EEPROM.  For example, if WATEREQFORN1 is a real and takes 4 bytes, it will occupy cells 0, 1, 2, 3 in EEPROM.  
The following code snippet shows a way to automatically and systematically allocate EEPROM space.  The sizeof operator returns the size in bytes of its argument.  Thus, an expression like WaterAddr2=WaterAddr1+sizeof waterEq1 correctly sets WaterAddr2 to be the next available cell after waterEq1, no matter what type waterEq1 is.
enum { WaterAddr1=0, WaterAddr2=WaterAddr1+sizeof waterEq1, DelayAddr=WaterAddr2+sizeof waterEq2 };
...
case 'A': 
  waterEq1 = val;
  EEPROM.put(WaterAddr1, waterEq1);
  break;
case 'B': 
  waterEq2 = val;
  EEPROM.put(WaterAddr2, waterEq2); 
  break;
case 'D':
  Delay = val;
  EEPROM.put(DelayAddr, Delay);
  break;
  ...


27726: <p>I want to save different values on address 0 and 1 on eeprom I tried to change it but when I put data on address 0 and also put data on address 1 the address 0 change its value stored into random number and vice versa .. Is it possible to change the value of respective address without affecting others .. </p>

<p><strong>CODE</strong></p>

<pre><code>in the setup
     int eepromSize=EEPROM.length();
      Serial.print("EEPROM found, size=");
      Serial.println(eepromSize);
        // Get the last fade value (as an integer)
      EEPROM.get(0, WATEREQFORN1);
      Serial.print("Last Value N1: ");
      Serial.println(WATEREQFORN1);

      EEPROM.get(1, WATEREQFORN2);
      Serial.print("Last Value N2: ");
      Serial.println(WATEREQFORN2);
</code></pre>

<p>The user will input the value that will be save in eeprom i use switch because the user will input like this example .. 100A or 23B </p>

<pre><code>case 'A':
        Serial.print("Case A got ");
        Serial.println(val);
        WATEREQFORN1 = val;

            EEPROM.put(0, WATEREQFORN1);
            Serial.print("DATA SAVE TO EEPROM");

        break;
      case 'B':
        Serial.print("Case B got ");
        Serial.println(val);
         WATEREQFORN2 = val;
         EEPROM.put(1, WATEREQFORN2);
         Serial.print("DATA SAVE TO EEPROM");

        break;
</code></pre>

<p>The problem is, when I change/write value into address 0 and after that change/write also into address 1 the value on address 0 also change into different random numbers.</p>
 313: <p>EEPROM.put() and EEPROM.get() write or read the object you pass them. An <code>int</code> is 2 bytes so that is what they write or read. It sounds like you intended for the functions to only handle 1 byte. In that case, make the your variable's data type something that is 1 byte, such as <code>int8_t</code>; otherwise allocate 2 bytes of EEPROM to each.</p>

<p>Update: 
It works because you had only allocated 1 byte in EEPROM for each variable but you store 2-byte variables. Now you're storing 1-byte variables, which matches your EEPROM allocation.</p>
 3917: <p>The variable names in all upper case is a style problem you should address.  Conventionally, C and C++ programmers use all-upper-case names to designate defined constants or macros.  Contravening that convention can lead to confusion if other people use or maintain the code.  Instead of <code>WATEREQFORN1</code> consider <code>waterEq1</code>, etc.</p>

<p>The problem of your second value overwriting part of the first in EEPROM is an allocation problem.  Presumably the <code>WATEREQ...</code> variables are multiple bytes in length.  <code>EEPROM.get()</code> and <code>put()</code> read and write data types with multiple bytes using several consecutive bytes of EEPROM.  For example, if <code>WATEREQFORN1</code> is a real and takes 4 bytes, it will occupy cells 0, 1, 2, 3 in EEPROM.  </p>

<p>The following code snippet shows a way to automatically and systematically allocate EEPROM space.  The <code>sizeof</code> operator returns the size in bytes of its argument.  Thus, an expression like <code>WaterAddr2=WaterAddr1+sizeof waterEq1</code> correctly sets <code>WaterAddr2</code> to be the next available cell after <code>waterEq1</code>, no matter what type <code>waterEq1</code> is.</p>

<pre><code>enum { WaterAddr1=0, WaterAddr2=WaterAddr1+sizeof waterEq1, DelayAddr=WaterAddr2+sizeof waterEq2 };
...
case 'A': 
  waterEq1 = val;
  EEPROM.put(WaterAddr1, waterEq1);
  break;
case 'B': 
  waterEq2 = val;
  EEPROM.put(WaterAddr2, waterEq2); 
  break;
case 'D':
  Delay = val;
  EEPROM.put(DelayAddr, Delay);
  break;
  ...
</code></pre>
