Tutorial.EEPROMRead History

Hide minor edits - Show changes to output

November 16, 2011, at 04:26 AM by Scott Fitzgerald -
Changed lines 25-26 from:
(:source http://arduino.cc/en/pub/code/master/libraries/EEPROM/examples/eeprom_read/eeprom_read.pde lang=arduino tabwidth=4:)
to:
(:source http://arduino.cc/en/pub/code/master/libraries/EEPROM/examples/eeprom_read/eeprom_read.ino lang=arduino tabwidth=4:)
September 28, 2010, at 01:21 PM by Tom Igoe -
Changed lines 25-26 from:
(:source http://arduino.cc/en/pub/code/master/libraries/EEPROM/examples/eeprom_write/eeprom_write.pde lang=arduino tabwidth=4:)
to:
(:source http://arduino.cc/en/pub/code/master/libraries/EEPROM/examples/eeprom_read/eeprom_read.pde lang=arduino tabwidth=4:)
September 28, 2010, at 01:20 PM by Tom Igoe -
Changed lines 25-58 from:
(:source lang=arduino tabwidth=4:)
#include <EEPROM.h>

// start reading from the first byte (address 0) of the EEPROM
int address = 0;
byte value;

void setup()
{
Serial.begin(9600);
}

void loop()
{
// read a byte from the current address of the EEPROM
value = EEPROM.read(address);

Serial.print(address);
Serial.print("\t");
Serial.print(value, DEC);
Serial.println();

// advance to the next address of the EEPROM
address = address + 1;

// there are only 512 bytes of EEPROM, from 0 to 511, so if we're
// on address 512, wrap around to address 0
if (address == 512)
address = 0;

delay(500);
}
(:sourceend:)
to:
(:source http://arduino.cc/en/pub/code/master/libraries/EEPROM/examples/eeprom_write/eeprom_write.pde lang=arduino tabwidth=4:)
September 23, 2010, at 10:45 PM by Christian Cerrito -
Changed lines 3-4 from:
!!EEPROM Read
to:
!!!EEPROM Read
September 20, 2010, at 02:16 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 example illustrates how to read the value of each byte EEPROM using the [[Reference/EEPROMRead | '''EEPROM.read()''' ]] function, and how to print those values to the serial window.
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 example illustrates how to read the value of each byte EEPROM using the [[Reference/EEPROMRead | '''EEPROM.read()''' ]] function, and how to print those values to the serial window.
September 20, 2010, at 02:12 PM by Christian Cerrito -
Added lines 66-67:

September 20, 2010, at 02:11 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 example illustrates how to read the value of each byte EEPROM using the [[Reference/EEPROMRead | @@EEPROM.read()@@ ]] function, and how to print those values to the serial window.
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 example illustrates how to read the value of each byte EEPROM using the [[Reference/EEPROMRead | '''EEPROM.read()''' ]] function, and how to print those values to the serial window.
Changed lines 14-15 from:
There is no circuit for this example, though your Arduino must be connected to your computer to enable serial communication.
to:
There is no circuit for this example.
Added lines 59-62:
* [[Reference/EEPROMRead | @@EEPROM.read()@@ ]]
* [[Reference/Serial | @@serial.begin()@@ ]]
* [[Reference/Serial | @@serial.print()@@ ]]
September 20, 2010, at 02:05 PM by Christian Cerrito -
Changed lines 14-15 from:
There is no circuit for this example.
to:
There is no circuit for this example, though your Arduino must be connected to your computer to enable serial communication.
September 20, 2010, at 01:58 PM by Christian Cerrito -
Added lines 7-20:
(:div class=BOM :)
!!!Hardware Required
* Arduino Board
(:divend:)

!!!Circuit
(:div class=circuit :)
There is no circuit for this example.

%height=250px%[[Attach:Arduino_bb.png | Attach:Arduino_bb.png]]
[-image developed using [[http://www.fritzing.org |Fritzing]]. For more circuit examples, see the [[http://fritzing.org/projects/|Fritzing project page]] -]

(:divend:)
September 20, 2010, at 01:58 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 example illustrates how to read the value of each byte EEPROM using the [[Reference/EEPROMRead | @@EEPROM.read()@@ ]] function, and print those values to the computer via serial.
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 example illustrates how to read the value of each byte EEPROM using the [[Reference/EEPROMRead | @@EEPROM.read()@@ ]] function, and how to print those values to the serial window.
September 20, 2010, at 01:56 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 example illustrates how to reads the value of each byte EEPROM using the [[Reference/EEPROMRead | @@EEPROM.read()@@ ]] function, and prints it to the computer via serial.
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 example illustrates how to read the value of each byte EEPROM using the [[Reference/EEPROMRead | @@EEPROM.read()@@ ]] function, and print those values to the computer via serial.
September 20, 2010, at 01:55 PM by Christian Cerrito -
Changed lines 5-6 from:
Reads the value of each byte of the EEPROM and prints it to the computer.
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 example illustrates how to reads the value of each byte EEPROM using the [[Reference/EEPROMRead | @@EEPROM.read()@@ ]] function, and prints it to the computer via serial.
September 16, 2010, at 11:10 PM by Tom Igoe -
Changed line 9 from:
[@
to:
(:source lang=arduino tabwidth=4:)
Changed lines 41-42 from:
@]
to:
(:sourceend:)
May 22, 2008, at 04:33 AM by David A. Mellis -
Changed lines 41-47 from:
@]
to:
@]

!!!See also

* [[EEPROMClear | EEPROM Clear example]]
* [[EEPROMWrite | EEPROM Write example]]
* [[Reference/EEPROM | EEPROM library reference]]
May 22, 2008, at 04:28 AM by David A. Mellis -
Added lines 1-41:
''Examples > EEPROM Library''

!!EEPROM Read

Reads the value of each byte of the EEPROM and prints it to the computer.

!!!Code

[@
#include <EEPROM.h>

// start reading from the first byte (address 0) of the EEPROM
int address = 0;
byte value;

void setup()
{
Serial.begin(9600);
}

void loop()
{
// read a byte from the current address of the EEPROM
value = EEPROM.read(address);

Serial.print(address);
Serial.print("\t");
Serial.print(value, DEC);
Serial.println();

// advance to the next address of the EEPROM
address = address + 1;

// there are only 512 bytes of EEPROM, from 0 to 511, so if we're
// on address 512, wrap around to address 0
if (address == 512)
address = 0;

delay(500);
}
@]

Share