{"id":103135,"date":"2022-04-13T16:10:00","date_gmt":"2022-04-13T16:10:00","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=103135"},"modified":"2024-02-19T17:47:48","modified_gmt":"2024-02-19T17:47:48","slug":"install-esp8266-nodemcu-littlefs-arduino","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/install-esp8266-nodemcu-littlefs-arduino\/","title":{"rendered":"Install ESP8266 NodeMCU LittleFS Filesystem Uploader in Arduino IDE"},"content":{"rendered":"\n<p>In this tutorial, you&#8217;ll learn how to install the ESP8266 LittleFS Filesystem Uploader Plugin in your Arduino IDE to upload files to the ESP8266 NodeMCU filesystem.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/Installing-LittleFS-Uploader-Plugin-Arduino-ESP8266.jpg?resize=1200%2C675&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Install ESP8266 LittleFS Filesystem Uploader in Arduino IDE\" class=\"wp-image-103152\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/Installing-LittleFS-Uploader-Plugin-Arduino-ESP8266.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/Installing-LittleFS-Uploader-Plugin-Arduino-ESP8266.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/Installing-LittleFS-Uploader-Plugin-Arduino-ESP8266.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/Installing-LittleFS-Uploader-Plugin-Arduino-ESP8266.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n<p>If you want to use LittleFS for the ESP8266 with VS Code + PlatformIO, follow the next tutorial instead:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp8266-nodemcu-vs-code-platformio-littlefs\/\">ESP8266 NodeMCU with VS Code and PlatformIO: Upload Files to Filesystem (LittleFS)<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"rntbox rntclgreen\"><strong>Are you using Arduino IDE 2?<\/strong> Follow this tutorial instead: <a href=\"https:\/\/randomnerdtutorials.com\/arduino-ide-2-install-esp8266-littlefs\/\">Arduino IDE 2: Install ESP8266 NodeMCU LittleFS Uploader (Upload Files to the Filesystem)<\/a>.<\/p>\n\n\n\n<p><strong>Table of Contents<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#introduction\">Introducing LittleFS<\/a><\/li>\n\n\n\n<li><a href=\"#installing\">Installing LittleFS Filesystem Uploader Plugin<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#installing-windows\">Windows Instructions<\/a><\/li>\n\n\n\n<li><a href=\"#installing-MAC\">Mac OS X Instructions<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#upload-files\">Uploading Files to ESP8266 using the Filesystem Uploader<\/a><\/li>\n\n\n\n<li><a href=\"#testing\">Testing the ESP8266 LittleFS Uploader<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"introduction\">Introducing LittleFS<\/h2>\n\n\n\n<p>LittleFS is a lightweight filesystem created for microcontrollers that lets you access the flash memory like you would do in a standard file system on your computer, but it&#8217;s simpler and more limited. You can read, write, close, and delete files. Using LittleFS with the ESP8266 boards is especially useful to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create configuration files with settings;<\/li>\n\n\n\n<li>Save data permanently;<\/li>\n\n\n\n<li>Create files to save small amounts of data instead of using a microSD card;<\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/esp8266-web-server-spiffs-nodemcu\/\">Save HTML, CSS, and JavaScript files to build a web server<\/a>;<\/li>\n\n\n\n<li><a href=\"https:\/\/randomnerdtutorials.com\/display-images-esp32-esp8266-web-server\/\">Save images, figures, and icons<\/a>;<\/li>\n\n\n\n<li>And much more.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"installing\">Installing LittleFS Filesystem Uploader Plugin<\/h2>\n\n\n\n<p>You can create, save and write files to the ESP8266 filesystem by writing the code yourself on the Arduino IDE. This is not very useful because you&#8217;d have to type your files&#8217; content in the Arduino sketch.<\/p>\n\n\n\n<p>Fortunately, <a href=\"https:\/\/github.com\/earlephilhower\/arduino-esp8266littlefs-plugin\" target=\"_blank\" rel=\"noreferrer noopener\">there is a plugin<\/a> for the Arduino IDE that allows you to upload files directly to the ESP8266 LittleFS filesystem from a folder on your computer. This makes it easy and straightforward to work with files.<\/p>\n\n\n\n<p class=\"rntbox rntclgray\"><a href=\"https:\/\/randomnerdtutorials.com\/install-esp8266-filesystem-uploader-arduino-ide\/\">SPIFFS<\/a> is currently deprecated and may be removed in future releases of the ESP8266 core. It is recommended to use <em>LittleFS<\/em> instead. LittleFS is under active development, supports directories, and is faster for most operations. The methods used for SPIFFS are compatible with LittleFS, so we can simply use the expression <span class=\"rnthl rntliteral\">LittleFS<\/span> instead of <span class=\"rnthl rntliteral\">SPIFFS<\/span> in our code.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"installing-windows\">Windows Instructions<\/h3>\n\n\n\n<p>Follow the next steps to install the filesystem uploader if you&#8217;re using Windows:<\/p>\n\n\n\n<p><strong>1)<\/strong> Go to the <a href=\"https:\/\/github.com\/earlephilhower\/arduino-esp8266littlefs-plugin\/releases\" target=\"_blank\" rel=\"noreferrer noopener\">releases page<\/a> and click the ESP8266LittleFS-X.zip file to download.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1118\" height=\"470\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/LittleFS-ESP8266-Download.png?resize=1118%2C470&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 LittleFS Download\" class=\"wp-image-103139\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/LittleFS-ESP8266-Download.png?w=1118&amp;quality=100&amp;strip=all&amp;ssl=1 1118w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/LittleFS-ESP8266-Download.png?resize=300%2C126&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/LittleFS-ESP8266-Download.png?resize=1024%2C430&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/LittleFS-ESP8266-Download.png?resize=768%2C323&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1118px) 100vw, 1118px\" \/><\/figure><\/div>\n\n\n<p><strong>2)<\/strong> Find your Sketchbook location. In your Arduino IDE, go to <strong>File<\/strong> &gt; <strong>Preferences<\/strong> and check your Sketchbook location. In my case, it&#8217;s in the following path: <span class=\"rnthl rntliteral\">C:\\Users\\sarin\\Documents\\Arduino<\/span>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"802\" height=\"479\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/Arduino-Sketchbook-location.png?resize=802%2C479&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Arduino sketchbook location\" class=\"wp-image-110399\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/Arduino-Sketchbook-location.png?w=802&amp;quality=100&amp;strip=all&amp;ssl=1 802w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/Arduino-Sketchbook-location.png?resize=300%2C179&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/Arduino-Sketchbook-location.png?resize=768%2C459&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 802px) 100vw, 802px\" \/><\/figure><\/div>\n\n\n<p><strong>3)<\/strong> Go to the sketchbook location, and create a <strong>tools <\/strong>folder.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"675\" height=\"229\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/creating-tools-folder-sketchbook-location.png?resize=675%2C229&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"creating tools folder sketchbook folder SPIFFS\" class=\"wp-image-110400\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/creating-tools-folder-sketchbook-location.png?w=675&amp;quality=100&amp;strip=all&amp;ssl=1 675w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/10\/creating-tools-folder-sketchbook-location.png?resize=300%2C102&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 675px) 100vw, 675px\" \/><\/figure><\/div>\n\n\n<p><strong>4)<\/strong> Unzip the downloaded <em>.zip<\/em> folder. Open it and copy the <em><strong>ESP8266LittleFS <\/strong><\/em>folder to the <strong>tools<\/strong> folder you created in the previous step. You should have a similar folder structure:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;Sketchbook-location&gt;\/<strong>tools\/ESP8266FS\/tool\/esp8266fs.jar<\/strong><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/install-little-fs-esp8266-filesystem-plugin-folder-structure.png?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"135\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/install-little-fs-esp8266-filesystem-plugin-folder-structure.png?resize=750%2C135&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"install LittleFS filesystem plugin ESP8266 folder structure\" class=\"wp-image-110420\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/install-little-fs-esp8266-filesystem-plugin-folder-structure.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2022\/04\/install-little-fs-esp8266-filesystem-plugin-folder-structure.png?resize=300%2C54&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/a><\/figure>\n\n\n\n<p><strong>5)<\/strong> Finally, restart your Arduino IDE.<\/p>\n\n\n\n<p>To check if the plugin was successfully installed, open your Arduino IDE and select your ESP8266 board. In the <span class=\"rnthl rntliteral\"><em><strong>Tools<\/strong><\/em><\/span> menu, check that you have the option &#8220;<strong>ESP8266 LittleFS Data Upload<\/strong>&#8220;.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"773\" height=\"464\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-tools-littlefs-data-upload-arduino-ide.png?resize=773%2C464&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 Tools LittleFS Data Upload Arduino IDE\" class=\"wp-image-103142\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-tools-littlefs-data-upload-arduino-ide.png?w=773&amp;quality=100&amp;strip=all&amp;ssl=1 773w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-tools-littlefs-data-upload-arduino-ide.png?resize=300%2C180&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-tools-littlefs-data-upload-arduino-ide.png?resize=768%2C461&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 773px) 100vw, 773px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\" id=\"installing-MAC\">Mac OS X Instructions<\/h3>\n\n\n\n<p>Follow the next steps to install the filesystem uploader if you&#8217;re using Mac OS X:<\/p>\n\n\n\n<p><strong>1)<\/strong> Go to the <a href=\"https:\/\/github.com\/earlephilhower\/arduino-esp8266littlefs-plugin\/releases\" target=\"_blank\" rel=\"noreferrer noopener\">releases page<\/a> and click the ESP8266LittleFS-X.zip file to download.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"1118\" height=\"470\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/LittleFS-ESP8266-Download.png?resize=1118%2C470&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 LittleFS Download\" class=\"wp-image-103139\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/LittleFS-ESP8266-Download.png?w=1118&amp;quality=100&amp;strip=all&amp;ssl=1 1118w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/LittleFS-ESP8266-Download.png?resize=300%2C126&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/LittleFS-ESP8266-Download.png?resize=1024%2C430&amp;quality=100&amp;strip=all&amp;ssl=1 1024w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/LittleFS-ESP8266-Download.png?resize=768%2C323&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 1118px) 100vw, 1118px\" \/><\/figure><\/div>\n\n\n<p><strong>2)<\/strong> Unpack the files. <\/p>\n\n\n\n<p><strong>3)<\/strong> Create a folder called <strong>tools<\/strong> in <span class=\"rnthl rntliteral\">\/Documents\/Arduino\/<\/span>.<\/p>\n\n\n\n<p><strong>4)<\/strong> Copy the unpacked <strong><em>ESP8266LitlteFS <\/em><\/strong>folder to the <strong>tools<\/strong> directory. You should have a similar folder structure.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/install-ESP8266-LittleFS-filesystem-plugin-folder-structure-mac-os-X.png?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"239\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/install-ESP8266-LittleFS-filesystem-plugin-folder-structure-mac-os-X.png?resize=750%2C239&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"install ESP8266 LittleFS filesystem plugin folder structure mac os X\" class=\"wp-image-110422\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/install-ESP8266-LittleFS-filesystem-plugin-folder-structure-mac-os-X.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/install-ESP8266-LittleFS-filesystem-plugin-folder-structure-mac-os-X.png?resize=300%2C96&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/a><\/figure><\/div>\n\n\n<pre class=\"wp-block-code\"><code>~Documents\/Arduino\/<strong>tools\/ESP8266FS\/tool\/esp8266fs.jar<\/strong><\/code><\/pre>\n\n\n\n<p><strong>5)<\/strong> Finally, restart your Arduino IDE.<\/p>\n\n\n\n<p>To check if the plugin was successfully installed, open your Arduino IDE. Select your ESP32 board, go to <strong>Tools <\/strong>and&nbsp;check that you have the option &#8220;<strong><strong>ESP8266 LittleFS Data Upload<\/strong><\/strong>&#8220;.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/ESP8266-LittleFS-Data-Sketch-Upload-Menu-Arduino-IDE-Mac-OS.jpg?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"677\" height=\"1024\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/ESP8266-LittleFS-Data-Sketch-Upload-Menu-Arduino-IDE-Mac-OS.jpg?resize=677%2C1024&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 LittleFS Data Upload Mac OS X\" class=\"wp-image-110421\" style=\"width:508px;height:768px\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/ESP8266-LittleFS-Data-Sketch-Upload-Menu-Arduino-IDE-Mac-OS.jpg?resize=677%2C1024&amp;quality=100&amp;strip=all&amp;ssl=1 677w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/ESP8266-LittleFS-Data-Sketch-Upload-Menu-Arduino-IDE-Mac-OS.jpg?resize=198%2C300&amp;quality=100&amp;strip=all&amp;ssl=1 198w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/ESP8266-LittleFS-Data-Sketch-Upload-Menu-Arduino-IDE-Mac-OS.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w\" sizes=\"(max-width: 677px) 100vw, 677px\" \/><\/a><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"upload-files\">Uploading Files to ESP8266 using the Filesystem Uploader<\/h2>\n\n\n\n<p>To upload files to the ESP8266 filesystem, follow the next instructions.<\/p>\n\n\n\n<p><strong>1)<\/strong> Create an Arduino sketch and save it. For demonstration purposes, you can save an empty sketch.<\/p>\n\n\n\n<p><strong>2)<\/strong> Then, open the sketch folder. You can go to <strong>Sketch<\/strong> &gt; <strong>Show Sketch Folder<\/strong>. The folder where your sketch is saved should open.<\/p>\n\n\n\n<p><strong>3)<\/strong> Inside that folder, create a new folder called <span class=\"rnthl rntliteral\"><strong><em>data<\/em><\/strong><\/span>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"297\" height=\"160\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/sketch-folder-data-folder-esp8266.png?resize=297%2C160&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Arduino Sketch Data Folder\" class=\"wp-image-103143\"\/><\/figure><\/div>\n\n\n<p><strong>4)<\/strong> Inside the <span class=\"rnthl rntliteral\"><strong><em>data<\/em><\/strong><\/span> folder is where you should put the files you want to save into the ESP8266 filesystem. As an example, create a <em>.txt<\/em> file with some text called <em>test_example<\/em>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"589\" height=\"161\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/text-file.png?resize=589%2C161&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Example txt file ESP8266\" class=\"wp-image-103144\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/text-file.png?w=589&amp;quality=100&amp;strip=all&amp;ssl=1 589w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/text-file.png?resize=300%2C82&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 589px) 100vw, 589px\" \/><\/figure><\/div>\n\n\n<p><strong>5)<\/strong> In the Arduino IDE, in the <strong>Tools<\/strong> menu, select the desired flash size (this will depend on the size of your files).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"772\" height=\"612\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-select-flash-size.png?resize=772%2C612&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 Select Flash Size Arduino IDE\" class=\"wp-image-103145\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-select-flash-size.png?w=772&amp;quality=100&amp;strip=all&amp;ssl=1 772w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-select-flash-size.png?resize=300%2C238&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-select-flash-size.png?resize=768%2C609&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 772px) 100vw, 772px\" \/><\/figure><\/div>\n\n\n<p><strong>6)<\/strong> Then, to upload the files in the Arduino IDE, you just need to go to <strong>Tools<\/strong> &gt; <strong>ESP8266 LittleFS Data Upload<\/strong>.<\/p>\n\n\n\n<p class=\"rntbox rntcred\"><strong>Important: <\/strong> ensure the Serial Monitor is closed. Otherwise, the upload will fail.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"773\" height=\"464\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-tools-littlefs-data-upload-arduino-ide.png?resize=773%2C464&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 Tools LittleFS Data Upload Arduino IDE\" class=\"wp-image-103142\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-tools-littlefs-data-upload-arduino-ide.png?w=773&amp;quality=100&amp;strip=all&amp;ssl=1 773w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-tools-littlefs-data-upload-arduino-ide.png?resize=300%2C180&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-tools-littlefs-data-upload-arduino-ide.png?resize=768%2C461&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 773px) 100vw, 773px\" \/><\/figure><\/div>\n\n\n<p>After a few seconds, you should get the message &#8220;<strong>LittleFS Image Uploaded<\/strong> &#8220;. The files were successfully uploaded to the ESP8266 filesystem.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"772\" height=\"204\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-littleFS-image-uploded.png?resize=772%2C204&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 LittleFS Image Uploaded Success\" class=\"wp-image-103146\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-littleFS-image-uploded.png?w=772&amp;quality=100&amp;strip=all&amp;ssl=1 772w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-littleFS-image-uploded.png?resize=300%2C79&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/esp8266-littleFS-image-uploded.png?resize=768%2C203&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 772px) 100vw, 772px\" \/><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"testing\">Testing the ESP8266 LittleFS Uploader<\/h2>\n\n\n\n<p>Now, let\u2019s check if the file was saved into the ESP8266 filesystem. Upload the following code to your ESP8266 board.<\/p>\n\n\n<pre style=\"max-height: 40em; margin-bottom: 20px;\"><code class=\"language-c\">#include &quot;LittleFS.h&quot;\n \nvoid setup() {\n  Serial.begin(115200);\n  \n  if(!LittleFS.begin()){\n    Serial.println(&quot;An Error has occurred while mounting LittleFS&quot;);\n    return;\n  }\n  \n  File file = LittleFS.open(&quot;\/test_example.txt&quot;, &quot;r&quot;);\n  if(!file){\n    Serial.println(&quot;Failed to open file for reading&quot;);\n    return;\n  }\n  \n  Serial.println(&quot;File Content:&quot;);\n  while(file.available()){\n    Serial.write(file.read());\n  }\n  file.close();\n}\n \nvoid loop() {\n\n}\n<\/code><\/pre>\n\t<p style=\"text-align:center\"><a class=\"rntwhite\" href=\"https:\/\/github.com\/RuiSantosdotme\/build-web-servers-ebook\/raw\/main\/Test_LITTLEFS_ESP8266\/Test_LITTLEFS_ESP8266.ino\" target=\"_blank\">View raw code<\/a><\/p>\n\n\n\n<p>After uploading, open the Serial Monitor at a baud rate of 115200. Press the ESP8266 on-board &#8220;RST&#8221; button. It should print the content of your <em>.txt<\/em> file on the Serial Monitor.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"669\" height=\"195\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/testing-esp8266-little-fs-serial-monitor.png?resize=669%2C195&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"Testing ESP8266 LittleFS Serial Monitor\" class=\"wp-image-103147\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/testing-esp8266-little-fs-serial-monitor.png?w=669&amp;quality=100&amp;strip=all&amp;ssl=1 669w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/testing-esp8266-little-fs-serial-monitor.png?resize=300%2C87&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 669px) 100vw, 669px\" \/><\/figure><\/div>\n\n\n<p>You&#8217;ve successfully uploaded files to the ESP8266 filesystem using the plugin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>Using the filesystem uploader plugin is one of the easiest ways to upload files to the ESP8266 filesystem. In this tutorial, we&#8217;ve shown you how to upload a <em>.txt<\/em> file, but you can upload other file formats like HTML, CSS, and Javascript files to build a web server, images, or small icons, save configuration files, etc.<\/p>\n\n\n\n<p>We have a project example in which we <a href=\"https:\/\/randomnerdtutorials.com\/esp8266-web-server-spiffs-nodemcu\/\">build a&nbsp;web server using HTML and CSS files saved on the filesystem<\/a> (simply replace <span class=\"rnthl rntliteral\">SPIFFS<\/span> with <span class=\"rnthl rntliteral\">LittleFS<\/span>). <\/p>\n\n\n\n<p>If you want to learn more about the ESP8266, check our resources:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"https:\/\/randomnerdtutorials.com\/home-automation-using-esp8266\/\">Home Automation using ESP8266<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/randomnerdtutorials.com\/build-web-servers-esp32-esp8266-ebook\/\">Build Web Servers with ESP32 and ESP8266<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/randomnerdtutorials.com\/firebase-esp32-esp8266-ebook\/\">Firebase Web App with ESP32 and ESP8266<\/a><\/strong><\/li>\n\n\n\n<li><strong><a href=\"https:\/\/randomnerdtutorials.com\/projects-esp8266\/\">More ESP8266 NodeMCU Projects and Guides\u2026<\/a><\/strong><\/li>\n<\/ul>\n\n\n\n<p>Thanks for reading.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial, you&#8217;ll learn how to install the ESP8266 LittleFS Filesystem Uploader Plugin in your Arduino IDE to upload files to the ESP8266 NodeMCU filesystem. If you want to &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Install ESP8266 NodeMCU LittleFS Filesystem Uploader in Arduino IDE\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/install-esp8266-nodemcu-littlefs-arduino\/#more-103135\" aria-label=\"Read more about Install ESP8266 NodeMCU LittleFS Filesystem Uploader in Arduino IDE\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":5,"featured_media":103152,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[214,265,246,300,240,264],"tags":[],"class_list":["post-103135","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esp8266","category-esp8266-project","category-esp8266-arduino-ide","category-0-esp8266","category-esp8266-projects","category-project"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2021\/04\/Installing-LittleFS-Uploader-Plugin-Arduino-ESP8266.jpg?fit=1280%2C720&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/103135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=103135"}],"version-history":[{"count":3,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/103135\/revisions"}],"predecessor-version":[{"id":148594,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/103135\/revisions\/148594"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/103152"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=103135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=103135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=103135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}