user4103: Trying to write 2 values coming from analogread(A0) and analogread(A1) by EEPROM.write  and retrieve the values by EEPROM.read. I tried the following sketch for each write and read. However, could not get the values. Any help please.
For writing to EEPROM:
#include <EEPROMex.h>
int addr = 0;
int array[] = {0, 0};
char a;
void setup() {
}
void loop() {
    array[0] = analogRead(0) / 4;
    array[1] = analogRead(1) / 4;
    EEPROM.write(addr, a);
    addr = addr + 1;

    if (addr == 512) {
        addr = 0;
    }

    delay(100);
}

For reading from EEPROM is:
#include <EEPROM.h>
int address = 0;
int value[2];
void setup() {
    Serial.begin(9600);

    while (!Serial) {
        ;
    }
}
void loop() {
    value = EEPROM.read(address);
    Serial.print(address);
    Serial.print("\t");
    Serial.print(value[0]);
    Serial.print("\t");
    Serial.print(value[1]);
    Serial.println();
    address = address + 1;

    if (address == 512) {
        address == 0;
    }

    delay(500);
}


user10794: See Reading and Writing Data Structures to EEPROM.
EEPROM.write(addr,a);

You can't directly write arrays. See the link for how to do it.
Example code:
#include <EEPROM.h>
#include <EEPROMAnything.h>

int array[2];
int addr=0;

void setup()
{  
}

void loop()
{
  array[0] = analogRead(0)/4;
  array[1] = analogRead(1)/4; 
  EEPROM_writeAnything(addr, array);
  addr += sizeof (array);

  if(addr >= 512)
    exit (1);

  delay(100);
}

Your posted code is a bit flawed anyway. You know EEPROM has a limited life? If you have a sketch that writes to EEPROM indefinitely you will wear it out.
My code above stops once it reaches address 512.

4103: <p>Trying to write 2 values coming from <code>analogread(A0)</code> and <code>analogread(A1)</code> by <code>EEPROM.write</code>  and retrieve the values by <code>EEPROM.read</code>. I tried the following sketch for each write and read. However, could not get the values. Any help please.</p>

<p>For writing to EEPROM:</p>

<pre><code>#include &lt;EEPROMex.h&gt;
int addr = 0;
int array[] = {0, 0};
char a;
void setup() {
}
void loop() {
    array[0] = analogRead(0) / 4;
    array[1] = analogRead(1) / 4;
    EEPROM.write(addr, a);
    addr = addr + 1;

    if (addr == 512) {
        addr = 0;
    }

    delay(100);
}
</code></pre>

<p>For reading from EEPROM is:</p>

<pre><code>#include &lt;EEPROM.h&gt;
int address = 0;
int value[2];
void setup() {
    Serial.begin(9600);

    while (!Serial) {
        ;
    }
}
void loop() {
    value = EEPROM.read(address);
    Serial.print(address);
    Serial.print("\t");
    Serial.print(value[0]);
    Serial.print("\t");
    Serial.print(value[1]);
    Serial.println();
    address = address + 1;

    if (address == 512) {
        address == 0;
    }

    delay(500);
}
</code></pre>
 10794: 

<p>See <a href="http://playground.arduino.cc/Code/EEPROMWriteAnything" rel="nofollow">Reading and Writing Data Structures to EEPROM</a>.</p>

<pre class="lang-C++ prettyprint-override"><code>EEPROM.write(addr,a);
</code></pre>

<p>You can't <em>directly</em> write arrays. See the link for how to do it.</p>

<p>Example code:</p>

<pre class="lang-C++ prettyprint-override"><code>#include &lt;EEPROM.h&gt;
#include &lt;EEPROMAnything.h&gt;

int array[2];
int addr=0;

void setup()
{  
}

void loop()
{
  array[0] = analogRead(0)/4;
  array[1] = analogRead(1)/4; 
  EEPROM_writeAnything(addr, array);
  addr += sizeof (array);

  if(addr &gt;= 512)
    exit (1);

  delay(100);
}
</code></pre>

<p>Your posted code is a bit flawed anyway. You know EEPROM has a limited life? If you have a sketch that writes to EEPROM indefinitely you will wear it out.</p>

<p>My code above stops once it reaches address 512.</p>
