This article explains in depth of what is SPIFFS and how to install File system Uploader in Arduino IDE using ESP8266 development board and then upload the files to the ESP8266 by using Arduino IDE.
What is SPIFFS
SPIFFS (Serial Peripheral Interface Flash File System) is a light-weight file system which is created for microcontrollers with a SPI flash chip. Basically, there are two ways to store data on ESP8266
- By using Internal EEPROM
- By using SPI Flash
Although file system is stored in the same chip as the program, but programming new sketch will not change or modify the file as program modify. And this will allow to use file system to store sketch data and configuration files. It means you can read write close or delete file. It supports flat structure that means directories in SPIFFS doesn’t support.
Install ESP8266 Filesystem uploader
In Arduino IDE we write programs and create, save or write files. But this is not mostly useful as, you have to write content of your file in Arduino IDE. But wait a minute there is a plugin for the Arduino IDE. and it allows you to directly upload file from a folder in your computer to the ESP8266 file system. This is very simple and reliable to use, so lest get started.
Esp8266 SPIFFS for begineer
First of all, what you need to do, is to install the latest version of Arduino IDE. Now follow the next step to install the file system uploader.
- Go to this page and click on the ESP8266-X.zip file to download.
2. Open tool folder from Arduino IDE Directory.
- Now restart Arduino IDE, finally.
- Now open the Arduino IDE and open the tool folder. In the tool menu you can check the option of “ESP8266 Sketch Data Uploader”.
Uploading Files using the Filesystem Uploader
While uploading the files on ESP8266 you should follow the following instructions.
- First of all, create the Arduino sketch and then save it.
- Now open the sketch folder from the sketch option.
- Now create a new folder inside this folder like this.
- Finally, your data file is ready and here you should put the files that you want to saved into the ESP8266.
- Now you can select the size of file from tools.
- Finally, you can upload the file by his tool.
Meanwhile you should receive a similar message in the uploading window.
Uploading the code
Now upload the following code to check whether it is working or not.
After uploading the code, you should open the serial monitor and press the reset button on the ESP8266 board for result with baud rate 115200. And you can see that it prints the text that is include in the .txt file.
ESP8266- what is SPI Flash File System (SPIFFS)
I hope this project helps you and if you have any question or issue elated to this project, then message me on the comment section. I’ll surely solve your problem. Thank you stay with us for more article(Esp8266 SPIFFS for begineer).
nodemcu esp8266 library for proteus
Esp8266 SPIFFS for begineer