Tutorial.EEPROMClear History

Hide minor edits - Show changes to markup

November 16, 2011, at 04:26 AM by Scott Fitzgerald -
Changed lines 25-27 from:
to:
September 28, 2010, at 01:19 PM by Tom Igoe -
Changed lines 25-27 from:
to:
September 28, 2010, at 01:18 PM by Tom Igoe -
Changed lines 25-27 from:
to:
September 28, 2010, at 01:17 PM by Tom Igoe -
Changed lines 25-42 from:
to:
September 23, 2010, at 10:45 PM by Christian Cerrito -
Changed lines 3-4 from:

EEPROM Clear

to:

EEPROM Clear

September 20, 2010, at 01:56 PM by Christian Cerrito -
September 20, 2010, at 01:45 PM by Christian Cerrito -
Changed lines 46-47 from:
to:
September 20, 2010, at 01:45 PM by Christian Cerrito -
Changed lines 23-24 from:

The code below uses a for() loop in cycling through all 512 bytes of EEPROM memory and setting them to 0. Because this needs to happen only once, the bulk of this code takes place in the setup() function when the sketch starts.

to:

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.

September 20, 2010, at 01:44 PM by Christian Cerrito -
Added lines 23-24:

The code below uses a for() loop in cycling through all 512 bytes of EEPROM memory and setting them to 0. Because this needs to happen only once, the bulk of this code takes place in the setup() function when the sketch starts.

September 20, 2010, at 01:40 PM by Christian Cerrito -
Changed lines 44-45 from:
to:
September 20, 2010, at 01:39 PM by Christian Cerrito -
Changed lines 44-45 from:
to:
September 20, 2010, at 01:39 PM by Christian Cerrito -
Added lines 43-45:
September 20, 2010, at 01:37 PM by Christian Cerrito -
Changed lines 5-6 from:

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 shows you how to set of all of those bytes to 0, initializing them to hold new information, using the EEPROM.write() function.

to:

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.

September 20, 2010, at 01:36 PM by Christian Cerrito -
Changed lines 5-6 from:

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 shows you how to set of all of those bytes to 0, initializing them to hold new information, using the EEPROM.write() function.

to:

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 shows you how to set of all of those bytes to 0, initializing them to hold new information, using the EEPROM.write() function.

September 20, 2010, at 01:36 PM by Christian Cerrito -
Changed lines 5-6 from:

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

to:

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 shows you how to set of all of those bytes to 0, initializing them to hold new information, using the EEPROM.write() function.

September 20, 2010, at 01:30 PM by Christian Cerrito -
Changed lines 5-6 from:

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

to:

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

September 20, 2010, at 01:30 PM by Christian Cerrito -
Changed lines 5-6 from:

The microcontroller on the Arduino board has 512 bytes of [[ http://en.wikipedia.org/wiki/EEPROM | EEPROM]: memory whose values are kept when the board is turned off (like a tiny hard drive). This

to:

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

September 20, 2010, at 01:29 PM by Christian Cerrito -
Changed lines 5-6 from:

Sets all of the bytes of the EEPROM to 0.

to:

The microcontroller on the Arduino board has 512 bytes of [[ http://en.wikipedia.org/wiki/EEPROM | EEPROM]: memory whose values are kept when the board is turned off (like a tiny hard drive). This

September 20, 2010, at 12:02 AM by Christian Cerrito -
Changed lines 45-46 from:
to:
September 20, 2010, at 12:01 AM by Christian Cerrito -
Changed lines 14-15 from:

There is no circuit for this example, though your Arduino must be connected to your computer via USB.

to:

There is no circuit for this example.

September 20, 2010, at 12:00 AM by Christian Cerrito -
Added lines 7-20:
September 16, 2010, at 11:09 PM by Tom Igoe -
Changed line 9 from:

[@

to:
Changed lines 25-26 from:

@]

to:
May 22, 2008, at 04:32 AM by David A. Mellis -
Changed lines 29-31 from:
to:
May 22, 2008, at 04:32 AM by David A. Mellis -
Changed lines 25-31 from:

@]

to:

@]

See also

May 22, 2008, at 04:27 AM by David A. Mellis -
Added lines 1-25:

Examples > EEPROM Library

EEPROM Clear

Sets all of the bytes of the EEPROM to 0.

Code

#include <EEPROM.h>

void setup()
{
  // write a 0 to all 512 bytes of the EEPROM
  for (int i = 0; i < 512; i++)
    EEPROM.write(i, 0);

  // turn the LED on when we're done
  digitalWrite(13, HIGH);
}

void loop()
{
}

Share