but instead of counting basicly, i want to push a little file.txt into it..(size=300 bytes)
First Step
Reading a file from Sd Card
void readFile(char* file ,char *fileData)
{
int16_t readed;
File myFile = SD.open(file,FILE_READ);
if(myFile!=NULL){
char* buf = (char*) malloc(myFile.size()+1);
readed = myFile.read(buf,myFile.size());
buf[readed]='\0';
myFile.close();
strcpy(fileData,buf);
free(buf);
}
else
strcpy(fileData,"Fail to open file");
}
Second step
call this funtion when you want to readfile for e.g file name test.txt
char fileData[300];
readFile("test.txt",fileData)
last step push data from
fileData to EEPROM it's on you
One important point intialize the SD (Sd.begin(4)) in setup