int val = Wire.read();
EEPROM.write(addr, val);
EEPROM.write() only writes 1 byte. An int is 2 bytes.
Do you see a problem ?
Have a look at the EEPROM.put() and EEPROM.get() functions
int val = Wire.read();
EEPROM.write(addr, val);
EEPROM.write() only writes 1 byte. An int is 2 bytes.
Do you see a problem ?
Have a look at the EEPROM.put() and EEPROM.get() functions