Thanks dhenry.Your code with some changes was OK.
BUT how I can store and after read in internal EEPROM float numbers (negative and possitive).
That is my code for write
#include <EEPROM.h>
#include "EEPROMAnything.h"
void setup(){
}
void loop()
{
//for (int i=0; i < noElem-1; i++){
EEPROM_writeAnything(0, -12.5);
delay(500);
EEPROM_writeAnything(1, -10.00);
delay(500);
EEPROM_writeAnything(2, -5.7);
delay(500);
EEPROM_writeAnything(3, 0);
delay(500);
EEPROM_writeAnything(4, 2.90);
delay(500);
EEPROM_writeAnything(5, 4);
delay(500);
EEPROM_writeAnything(6, 5.5);
delay(500);
}
and that is the code for reading the data
#include <EEPROM.h>
#include "EEPROMAnything.h"
int address = 0;
float value;
void setup()
{
// initialize serial and wait for port to open:
Serial.begin(9600);
}
void loop()
{
// read a byte from the current address of the EEPROM
EEPROM_readAnything(address,value);
Serial.print(address);
Serial.print("\t");
Serial.print(value);
Serial.println();
address = address + 1;
if (address == 512)
address = 0;
delay(500);
}
I can read correct the data
Pease advice
Oldnick