Hello everyone
I am working on a project and i need to save the elements of an integer array to sd card. I have written the code for that task and it actually works but the thing is it doesnt take the first two element correctly. Instead it saves randomly each time and also it updates the first element of that array randomly which causes problems because i use that array in different parts of my program. I really don't undestand why is that happening. (By the way it usually saves the first element as 29816 and second 256 but that is not the certain case)
Here is my code:
file=SD.open(filename,FILE_WRITE); //filename is a string
if(file){
for(int i=0;i<arraylength;i++){
file.print(intarray[i]);
file.print(" ");
}
}
Thanks for your responses...