i inspired from https://github.com/esp8266/Arduino/issues/3062
with function
while (f.available()){ Serial.println(f.readStringUntil('\n')); }
For compile set:
board > NodeMCU 1.0 (ESP-12E Module)
Flash Size: 4M (3M SPIFFS)
in file_system_stuff.ino insert
line 20
String LoadDatacosty(String fileNameForSave)
{
String WhatIwillReturn ="";
//SPIFFS.begin();
File f = SPIFFS.open(String("/uploads/" + fileNameForSave + ".nc"), "r");
if (!f)
{
fileOpenFail = 1;
//Serial.print("file open failed :");
//Serial.println(fileNameForSave);
}
else
{
fileOpenFail = 0;
while (f.available()){
WhatIwillReturn = f.readStringUntil('\r');
}
// WhatIwillReturn.replace("\n", "");
f.close();
}
//Serial.println(String("Data Read " + WhatIwillReturn));
return WhatIwillReturn;
}
in eval.ino insert
line 619
else if ( fname == F("readcosty") && num_args == 1 ) {
*value_str = "";
*value_str = LoadDatacosty(*args_str[0]);
return PARSER_STRING;
}
in ESP8266Basic.ino insert (for upload on air)
use: http://192.168.4.1/update
48 #include <ESP8266HTTPUpdateServer.h>
49 ESP8266HTTPUpdateServer httpUpdater;
1218 httpUpdater.setup(&server);
For find arduino file bin ... select in Preferences:
Show verbose output during X compilation X download