Utilizing the EEPROM read/write anything library!

Im using the EEPROM read write anything(http://arduino.cc/playground/Code/EEPROMWriteAnything) library and i have implemented in this way(example):

#include <EEPROM.h>
#include "EEPROMAnything.h"

unsigned long odoIncrement;
unsigned long LCDshow;

void setup {
LCDshow = EEPROM_readAnything(0, odoIncrement);
}

void loop {
EEPROM_writeAnything(0, odoIncrement); 
}

My idea is to write kms to eeprom and then retrieve the same and show on the LCD.Im not getting the results as they should be?

Im not getting the results as they should be?

Is this a question or a statement?

If it is a question, that code has no output, so how do you know that there is a problem?

its a part of a complete programme so i have just giving you an idea how im utilising the code.

Meanwhile i caught something up ,i come back to the post with the results i have.

OK i got the remedy of the above thing, if i want to remove the previous eeprom contents then what i have to do?

should write 00000's to it? simply.

should write 00000's to it? simply.

Or change the type to signed, and write -1.

unsigned long odoIncrement;

Unlike standard longs unsigned longs won't store negative numbers, making their range from 0 to 4,294,967,295

Planning on riding quite a ways?

FIne! ;)

Just remember if you write to the same eeprom locations too often you're going to exhaust it (IIRC it has around 100k max write cycles).

As far as I know, you can only store a single byte in an EEPROM address. This means any number between 0 and 255 can be stored.

@ tuxidino i'm aware of that, that's why only i write my code as such that it writes to the eeprom only when its necessary.

@ john_s, there are 512bytes or 1024 bytes as per respective ATmega chip so to a single byte you can write a number from 0 to 255 and when you use EEPROMwriteAnything library it provides you the facility to choose the starting byte location from where you want to start writing the number you have to the EEPROM so it gradually fills up the number of bytes.

PaulS:

Unlike standard longs unsigned longs won't store negative numbers, making their range from 0 to 4,294,967,295

Planning on riding quite a ways?

Somewhat further than Jupiter, it seems. Is that even safe? Will the Arduino work out there?