Skip to main content
added 35 characters in body
Source Link
Majenko
  • 105.9k
  • 5
  • 82
  • 139

You write the read value directly to value, while value is actually and array. Try this instead.

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

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

    delay(500);
}

You write the read value directly to value, while value is actually and array. Try this instead.

void loop()
 {
value[0] = EEPROM.read(address);
value[1] = EEPROM.read(address+1);
Serial.print(address);
Serial.print("\t");
Serial.print(value[0]);
Serial.print("\t");
Serial.print(value[1]);
Serial.println();
address=address+2;
if (address==512)
  address=0; // not address==0;
delay(500);
}

You write the read value directly to value, while value is actually and array. Try this instead.

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

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

    delay(500);
}
added 20 characters in body
Source Link
Gerben
  • 11.3k
  • 3
  • 22
  • 34

You write the read value directly to value, while value is actually and array. Try this instead.

void loop()
{
value[0] = EEPROM.read(address);
value[1] = EEPROM.read(address+1);
Serial.print(address);
Serial.print("\t");
Serial.print(value[0]);
Serial.print("\t");
Serial.print(value[1]);
Serial.println();
address=address+2;
if (address==512)
  address=0; // not address==0;
delay(500);
}

You write the read value directly to value, while value is actually and array. Try this instead.

void loop()
{
value[0] = EEPROM.read(address);
value[1] = EEPROM.read(address+1);
Serial.print(address);
Serial.print("\t");
Serial.print(value[0]);
Serial.print("\t");
Serial.print(value[1]);
Serial.println();
address=address+2;
if (address==512)
address==0;
delay(500);
}

You write the read value directly to value, while value is actually and array. Try this instead.

void loop()
{
value[0] = EEPROM.read(address);
value[1] = EEPROM.read(address+1);
Serial.print(address);
Serial.print("\t");
Serial.print(value[0]);
Serial.print("\t");
Serial.print(value[1]);
Serial.println();
address=address+2;
if (address==512)
  address=0; // not address==0;
delay(500);
}
Source Link
Gerben
  • 11.3k
  • 3
  • 22
  • 34

You write the read value directly to value, while value is actually and array. Try this instead.

void loop()
{
value[0] = EEPROM.read(address);
value[1] = EEPROM.read(address+1);
Serial.print(address);
Serial.print("\t");
Serial.print(value[0]);
Serial.print("\t");
Serial.print(value[1]);
Serial.println();
address=address+2;
if (address==512)
address==0;
delay(500);
}