Skip to content

Arduino: How to Read and Write EEPROM values

2012 August 1
by Tedb0t

When you reset an Arduino, the state of any variables you might have will be lost. So what if you want to keep a value even after it’s been powered off? Luckily, ATmega chips have an area of memory called EEPROM, or “Electrically Erasable Programmable Read-Only Memory.”  This allows you to store persistent values, and Arduino ships with an EEPROM library that makes it easy to use.

Here’s an example Arduino sketch that demonstrates how to read from and write to this part of memory:

Related Posts:

Comments are closed.