There will come a point where you will want to store data which isn’t lost when your microprocessor loses power. This is particularly handy for storing calibration or configuration values, to save you having to re-calibrate some piece of hardware (e.g., IMUs, and servos) every time the power cycles. One solution for Arduino boards is using EEPROM (Electrically Erasable Programmable Read-Only Memory).
EEPROM is a type of non-volatile ROM that enables individual bytes of data to be erased and reprogrammed. It is used to store small amounts of data which are written occasionally and then read multiple times.
EEPROM is often contained within the microprocessor, and different boards will have different amounts. For example, the ATMega328P used in the UNO R3 and Nano, has 1024 bytes (1KB) of EEPROM. It is organized as a separate data space, and the EEPROM data bytes are addressed linearly between 0 and 1023.
Our example application will save calibration data for six servo motors. This is well suited to saving in EEPROM as it doesn’t often change and reading the values are not time critical. You can read the full Arduino EEPROM article on Medium.