Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By picstart
#44749 First post above may suffer from the typical hidden dependency issue that Arduino code unfortunately all to often has.
Here is the error
In file included from dk_SPIFFS.ino.ino:7:0:
C:\Users\Doug\AppData\Local\Temp\build4710410840931580516.tmp\FS.h:62:12: error: 'size_t fs::File::readBytes(char*, size_t)' marked override, but does not override
size_t readBytes(char *buffer, size_t length) override {
^
Error compiling.
User avatar
By Farhan Younus
#52738 I have found an easy way to read all the content in a SPIFF file. Here's an example.

Code: Select allFile f = SPIFFS.open( "/your-file-name.txt, "r");
  if (!f) {
    Serial.println("file open failed");
  }
  String data = f.readString();
  Serial.println("------ Loop Read method -------");
  Serial.println(data);
  f.close();


the file name extension can be any type with data type text/html, text/plain, etc...
User avatar
By RichardS
#55742 Would this not terminate the read when it hits a zero? Not a character '0' but a byte of 0x00.

RichardS