Can I initialize SPIFFS from code ?
Posted:
Fri Feb 26, 2016 1:36 am
by RogerClark
To save uploading an empty SPIFFS file to the ESP8266, does anyone know if I can init the SPIFFS in the code
I took a look at the SPIFFS header in the ESP8266 Arduino repo
https://github.com/esp8266/Arduino/blob ... s/spiffs.hBut I can't see anything about how to initialise the SPIFFS
Re: Can I initialize SPIFFS from code ?
Posted:
Fri Feb 26, 2016 9:32 am
by martinayotte
Hi Roger,
You should not include "spiffs.h" directly, but use the "FS.h" instead.
Code: Select allif (!SPIFFS.begin()) {
Serial.println("SPIFFS failed to mount !");
}
else {
SPIFFS.format();
Serial.println("SPIFFS fortmatted !");
}
Re: Can I initialize SPIFFS from code ?
Posted:
Sat Feb 27, 2016 5:03 am
by RogerClark
Thanks Martin
That will save a lot of time
Re: Can I initialize SPIFFS from code ?
Posted:
Wed Mar 02, 2016 10:01 pm
by RogerClark
Another silly question, but how fast is SPIFFS supposed to be?
I'm reading in 160 chars into a String, and it is taken quite a long time, i.e looks like hundreds of milliseconds
Perhaps reading into a String is very inefficient ?