Thursday, May 6, 2010

Task 51 - EEPROM


This program prints all values to the screen as FF (255) except the first byte in EEPROM which showed 69 (105).

#include

int a = 0;
int value;

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

void loop()
{
value = EEPROM.read(a);

Serial.print(a);
Serial.print("\t");
Serial.print(value);
Serial.println();

a = a + 1;

if (a == 512)
a = 0;

delay(10);
}

No comments:

Post a Comment