The code to insert the float values follows:
#include <EEPROM.h>
struct MyObject {
float field1;
byte field2;
char name[10];
};
void setup() {
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
float f; //Variable to store in EEPROM.
int eepromAdd = 0; //Location we want the data to be put.
//One simple call, with the address first and the object second.
EEPROM.put( eepromAdd,-0.085); eepromAdd += sizeof(float);
EEPROM.put( eepromAdd,-0.080); eepromAdd += sizeof(float);
EEPROM.put( eepromAdd,-0.070); eepromAdd += sizeof(float);
EEPROM.put( eepromAdd,-0.075); eepromAdd += sizeof(float);
EEPROM.put( eepromAdd,-0.095); eepromAdd += sizeof(float);
EEPROM.put( eepromAdd,-0.090); eepromAdd += sizeof(float);
.
. ~more EEPROM.put~
.
Serial.println(eepromAdd);//printing the address
Serial.println(EEPROM.get(4,f),3);//2nd float
Serial.println(EEPROM.get(8,f),3);//3rd float
Serial.println(EEPROM.get(12,f),3);//4th float
}
PS: ECG samples from Physionet Database; Sample rate: 2 miliseconds