EEPROM library not found. But EEPROM folder is in the arduino folder.

Hello i have a small problem I’m just trying to see if i can write to the EEPROM of the Arduino m0 feather board. I get this error when i do,

C:\Users\KNIGHT~1\AppData\Local\Temp\arduino_modified_sketch_459268\sketch_jul29a.ino:1:20: fatal error: EEPROM.h: No such file or directory

 #include <EEPROM.h>


compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Zero (Native USB Port).

It is saying that the EEPROM.h can not be found. But if i select a UNO board and compile the same code it compiles with no problem. Still new of new to the whole M0 board. Can someone please help me out?

Does the M0 actually have EEPROM?

That is what I'm wondering. I thought it does?

The EEPROM library is architecture specific. For that reason, each hardware package will bundle its own version of the library. The libraries folder in a hardware package is only in the include path when compiling for a board of that package, or one that references it.

The Zero doesn't have EEPROM and so the Arduino SAMD Boards hardware package does not bundle an EEPROM library.

You might find this useful:

Note that you need to be especially careful not to wear out the flash memory on your Zero with that library.

Hello Pert thank you.