I've included in my sketch and am trying to run a simple sketch that just does EEPROM.write(0,4); followed by a println of EEPROM.read(0); However, it won't compile. It keeps telling me there is an error, and that I'm making a "request for member 'write' in something that is not a structure or a union". I'm using the Mega ADK. What am I doing wrong? I've also tried to go to sketch->include libraries and include the EEPROM library directly, still no joy. This is Arduino 1.6.13 on Windows 8, if it matters.
The problem had to do with data types. I was using an unsigned int as follows:
unsigned int addr = 0; EEPROM.write(addr,5);
However, EEPROM.write requires an int, not an unsigned int, and this caused a compiler error.