EEPROM Experiments

1 To see that the data written in the EEPROM actually remains after power is removed, you need to remove all the write commands in the code (just comment them out). Upload the program. Then disconnect the power. Then plug the power back in and run the program. You should see the same values printed out.
2 The program on the right is almost identical to the one in the EEPROM project step 2 program except that it writes the integer value 1234 instead of the value 28. Run the program and try to understand why the value printed out is 210 instead of 1234?
#include <EEPROM.h>
void setup() {
  Serial.begin(9600);
  int address;  // a number between 0 and 1023
  int value;    // a number between 0 and 255
  int readback;

  // writes the number 1234 into address location 0 of the EERPOM
  address = 0;
  value = 1234;
  EEPROM.write(address, value);
  
  // reads the value from address location 0 of the EEPROM
  address = 0;
  readback = EEPROM.read(address);
  Serial.print("Read value ");
  Serial.println(readback);
}

void loop() {
}