14 May 2010

Task 51 - basic EEPROM program & screeen dump: software

/*
below is the no-frills EEPROM program.
i'll make a nicer, tidier one later on..
*/


#include EEPROM.h


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(500);
}

/*
VERY IMPORTANT!!
In the above codings there are
#include EEPROM.h
statements.
Around the EEPROM.h there should be 'less-than' &
'greater-than' symbols.
these don't show up in these blog postings..
..don't forget them!
*/

No comments:

Post a Comment