Hi
I'm tiring edit text file using seek function. But see always return 0. Here is the function I'm using
void SaveScount(int in, String Scount){
//Serial.println(Scount);
ScoFile = SD.open("SwitchCount5.txt",O_APPEND);
if(ScoFile){
Serial.println(in);
ScoFile.seek(in*31);
Serial.println(myFile.position());
//ScoFile.print(in);
//ScoFile.println(":");
ScoFile.println(Scount);
}
else{
Serial.println("file opning fails");
}
}
I'm tiring edit text file using seek function. But see always return 0. Here is the function I'm using
void SaveScount(int in, String Scount){
//Serial.println(Scount);
ScoFile = SD.open("SwitchCount5.txt",O_APPEND);
if(ScoFile){
Serial.println(in);
ScoFile.seek(in*31);
Serial.println(myFile.position());
//ScoFile.print(in);
//ScoFile.println(":");
ScoFile.println(Scount);
}
else{
Serial.println("file opning fails");
}
}