Anyone could help me? Thanks a lot
void readoutput(){
File file = LittleFS.open("/file.txt", "r");
if(!file){
Serial.println("Error Opening File");
} Serial.println("Success Opening File");
File output = LittleFS.open("/output.txt", "w");
if(!output){
Serial.println("Error opening Output File");
} Serial.println("Success opening Output File");
while(file.available()){
int count = 0;
Serial.println(count);
String b = file.readStringUntil('\n');
if(b){
if(count == 10){
output.close();
}else{output.println(b);}
} else {
Serial.println("Closing output file...");
output.close();
}
}
}//end readoutput