Learning Examples | Foundations | Hacking | Links
Examples > EEPROM Library
The microcontroller on the Arduino board has 512 bytes of EEPROM: memory whose values are kept when the board is turned off (like a tiny hard drive). This example illustrates how to set of all of those bytes to 0, initializing them to hold new information, using the EEPROM.write() function.
There is no circuit for this example.
image developed using Fritzing. For more circuit examples, see the Fritzing project page
The code below uses a for() loop in cycling through all 512 bytes of EEPROM memory, and in setting them each to 0. Because this needs to happen only once, the bulk of this code takes place in the setup() function when the sketch starts.