{"id":24196,"date":"2021-11-28T20:58:03","date_gmt":"2021-11-28T11:58:03","guid":{"rendered":"https:\/\/www.souichi.club\/?p=24196"},"modified":"2022-03-19T17:17:41","modified_gmt":"2022-03-19T08:17:41","slug":"spiffs","status":"publish","type":"post","link":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/","title":{"rendered":"Try to read and write files from a sketch using SPIFFS on ESP32"},"content":{"rendered":"<ul class=\"bogo-language-switcher list-view\"><li class=\"en-US en current first\"><span class=\"bogoflags bogoflags-us\"><\/span> <span class=\"bogo-language-name\"><a rel=\"alternate\" hreflang=\"en-US\" href=\"https:\/\/www.souichi.club\/en\/wp-json\/wp\/v2\/posts\/24196\/\" title=\"English\" class=\"current\" aria-current=\"page\">English<\/a><\/span><\/li>\n<li class=\"ja last\"><span class=\"bogoflags bogoflags-jp\"><\/span> <span class=\"bogo-language-name\"><a rel=\"alternate\" hreflang=\"ja\" href=\"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts\/24196\/\" title=\"Japanese\">\u65e5\u672c\u8a9e<\/a><\/span><\/li>\n<\/ul>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a8dd7a7b47ca\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #454e5c;color:#454e5c\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #454e5c;color:#454e5c\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a8dd7a7b47ca\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#SPIFFS\" >SPIFFS<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Environment\" >Environment<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Install_the_uploader\" >Install the uploader<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Download\" >Download<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Unzip_the_file\" >Unzip the file<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Check_the_Arduino_IDE_environment\" >Check the Arduino IDE environment<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#tools\" >tools<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Check\" >Check<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Partition_Scheme\" >Partition Scheme<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Uploading\" >Uploading<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Prepare_the_files\" >Prepare the files<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#upload\" >upload<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Skecth\" >Skecth<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Loading\" >Loading<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Execution_Results\" >Execution Results<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Delete\" >Delete<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Write\" >Write<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#Execution_Result\" >Execution Result<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"SPIFFS\"><\/span>SPIFFS<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There was a time when I wanted to save a configuration file on ESP32-WROOM-32 and load it from a sketch program.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This article describes how I tried to use SPIFFS (SPI Flash File System).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The saved file is stored in the user area of the ESP32 flash memory.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Environment\"><\/span>Environment<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The following environment was tested.<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-regular\">\n<table class=\"r_table01\">\n<tbody>\n<tr>\n<td class=\"r_td30\">\n<p>OS<\/p>\n<\/td>\n<td>\n<p>Windows 10 Home\uff0864 Bit\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Arduino IDE<\/p>\n<\/td>\n<td>\n<p>1.8.13<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Module<\/p>\n<\/td>\n<td>\n<p>ESP32-WROOM-32<\/p>\n<p>ESP32 with Wi-Fi and Bluetooth in one module<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Install_the_uploader\"><\/span>Install the uploader<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Install the uploader in the Arduino IDE.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Download\"><\/span>Download<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/me-no-dev\/arduino-esp32fs-plugin\" target=\"_blank\" rel=\"noreferrer noopener\">Go to this site<\/a>, scroll down, and click &#8220;releases page&#8221; under Download the tool archive from releases page.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-01.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-01.png?resize=768%2C359&#038;ssl=1\" alt=\"Download the spiffs uploader\" class=\"wp-image-24159\" width=\"768\" height=\"359\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-01.png?resize=1024%2C478&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-01.png?resize=300%2C140&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-01.png?resize=768%2C359&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-01.png?resize=1536%2C718&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-01.png?w=1862&amp;ssl=1 1862w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Download ESP32FS-1.0.zip.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-02.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-02.png?resize=768%2C374&#038;ssl=1\" alt=\"Download ESP32FS-1.0.zip\" class=\"wp-image-24160\" width=\"768\" height=\"374\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-02.png?resize=1024%2C498&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-02.png?resize=300%2C146&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-02.png?resize=768%2C374&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-02.png?resize=1536%2C747&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-02.png?w=1862&amp;ssl=1 1862w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Unzip_the_file\"><\/span>Unzip the file<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When you unzip the downloaded file, you will see the following folder structure.<\/p>\n\n\n<pre><code class=\"lang-shell\">\u251c\u2500ESP32FS-1.0\n\u2502  \u2502      \n\u2502  \u251c\u2500ESP32FS\n\u2502  \u2502  \u2502\n\u2502  \u2502  \u251c\u2500\u2500tool\n\u2502  \u2502  \u2502  esp32fs.jar\n\u2502  \u2502  \u2502<\/code><\/pre>\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-01.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-01.png?resize=768%2C439&#038;ssl=1\" alt=\"unzipping\" class=\"wp-image-24202\" width=\"768\" height=\"439\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-01.png?resize=1024%2C585&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-01.png?resize=300%2C172&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-01.png?resize=768%2C439&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-01.png?resize=1536%2C878&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-01.png?w=1714&amp;ssl=1 1714w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Check_the_Arduino_IDE_environment\"><\/span>Check the Arduino IDE environment<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Start the Arduino IDE and check the sketchbook location.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Select File &gt; Preferences.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-02.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-02.png?resize=768%2C491&#038;ssl=1\" alt=\"Preferences\" class=\"wp-image-24204\" width=\"768\" height=\"491\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-02.png?resize=1024%2C654&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-02.png?resize=300%2C191&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-02.png?resize=768%2C490&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-02.png?w=1341&amp;ssl=1 1341w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Check the sketchbook location.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The default location is C:\u00a5Users\u00a5Username\u00a5Documents\u00a5Arduino.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-03.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-03.png?resize=602%2C403&#038;ssl=1\" alt=\"Sketchbook Location\" class=\"wp-image-24205\" width=\"602\" height=\"403\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-03.png?w=802&amp;ssl=1 802w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-03.png?resize=300%2C201&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-03.png?resize=768%2C514&amp;ssl=1 768w\" sizes=\"auto, (max-width: 602px) 100vw, 602px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"tools\"><\/span>tools<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create a &#8220;tools&#8221; folder under the above folder, and copy the folder and files under ESP32FS that you unzipped.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-04.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-04.png?resize=768%2C439&#038;ssl=1\" alt=\"folder copy\" class=\"wp-image-24206\" width=\"768\" height=\"439\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-04.png?resize=1024%2C585&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-04.png?resize=300%2C172&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-04.png?resize=768%2C439&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-04.png?resize=1536%2C878&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-04.png?w=1714&amp;ssl=1 1714w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Check\"><\/span>Check<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After exiting the Arduino IDE and starting it up, I found that &#8220;ESP32 Sketch Data Upload&#8221; was added to the Tools menu.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use this menu to write the file to the flash memory of ESP32.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-05.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-05.png?resize=768%2C490&#038;ssl=1\" alt=\"ESP32 Sketch Data Upload\" class=\"wp-image-24209\" width=\"768\" height=\"490\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-05.png?resize=1024%2C653&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-05.png?resize=300%2C191&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-05.png?resize=768%2C490&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-05.png?w=1340&amp;ssl=1 1340w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Partition_Scheme\"><\/span>Partition Scheme<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Select a Partition Scheme that has SPIFFS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When I selected a Partition Scheme without SPIFFS (e.g. Default 4MB with ffat (1.2MB APP\/1.5MB FATTS)) and tried to Upload, I got &#8220;SPIFFS Error: partition size could not be found! SPIFFS Error: partition size could not be found!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-07.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-07.png?resize=768%2C488&#038;ssl=1\" alt=\"Partition Scheme\" class=\"wp-image-24218\" width=\"768\" height=\"488\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-07.png?resize=1024%2C651&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-07.png?resize=300%2C191&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-07.png?resize=768%2C488&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-07.png?w=1341&amp;ssl=1 1341w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Uploading\"><\/span>Uploading<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Upload the file manually and try to read it from the sketch.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Prepare_the_files\"><\/span>Prepare the files<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">I created a &#8220;data&#8221; folder under the folder where the sketch is saved and put the file I want to copy (config.ini).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The name of the &#8220;data&#8221; folder seems to be &#8220;predetermined&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-06.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-06.png?resize=768%2C439&#038;ssl=1\" alt=\"created config.ini\" class=\"wp-image-24210\" width=\"768\" height=\"439\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-06.png?resize=1024%2C585&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-06.png?resize=300%2C172&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-06.png?resize=768%2C439&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-06.png?resize=1536%2C878&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-06.png?w=1714&amp;ssl=1 1714w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">config.ini<\/p>\n\n\n<pre><code class=\"lang-shell\">client_id=SKSPI0001\nflg1=1\nflg2=0\nflg3=0<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"upload\"><\/span>upload<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">When I selected Tools &gt; ESP32 Sketch Data Upload, the message &#8220;SPIFFS image Uploaded&#8221; appeared and the config.ini file under the data folder was written to ESP32.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-08.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-08.png?resize=768%2C491&#038;ssl=1\" alt=\"SPIFFS Image Uploaded\" class=\"wp-image-24219\" width=\"768\" height=\"491\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-08.png?resize=1024%2C655&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-08.png?resize=300%2C192&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-08.png?resize=768%2C491&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-08.png?w=1341&amp;ssl=1 1341w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The message is as follows.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It turns out that config.sys, desktop.ini (a file created automatically by Windows to store desktop display information), and spiffs.spiffs.bin files under the data folder have been written.<\/p>\n\n\n<pre><code class=\"lang-shell\">[SPIFFS] data   : D:\\GoogleDriveD\\M2B\\Program\\ArduinoProgram\\spiffsen\\data\n[SPIFFS] start  : 2686976\n[SPIFFS] size   : 1472\n[SPIFFS] page   : 256\n[SPIFFS] block  : 4096\n\/config.ini\n\/desktop.ini\n[SPIFFS] upload : C:\\Users\\UserName\\AppData\\Local\\Temp\\arduino_build_197820\/spiffsen.spiffs.bin\n[SPIFFS] address: 2686976\n[SPIFFS] port   : COM7\n[SPIFFS] speed  : 115200\n[SPIFFS] mode   : dio\n[SPIFFS] freq   : 80m\n\nesptool.py v3.0-dev\nSerial port COM7\nConnecting....\nChip is ESP32-D0WDQ6 (revision 1)\nFeatures: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None\nCrystal is 40MHz\nMAC: f0:08:d1:d2:7b:20\nUploading stub...\nRunning stub...\nStub running...\nConfiguring flash size...\nAuto-detected Flash size: 4MB\nCompressed 1507328 bytes to 3025...\nWriting at 0x00290000... (100 %)\nWrote 1507328 bytes (3025 compressed) at 0x00290000 in 0.3 seconds (effective 42913.3 kbit\/s)...\nHash of data verified.\n\nLeaving...\nHard resetting via RTS pin...<\/code><\/pre>\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Skecth\"><\/span>Skecth<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Loading\"><\/span>Loading<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A sketch that reads and displays the config.ini file under the data folder.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">spiffs.ino<\/p>\n\n\n<pre class=\"line-numbers\"><code class=\"lang-cpp\">\/*\n * SPIFFS Test Scketch\n *  \n *\/\n#include \"SPIFFS.h\"\n\nvoid setup() {\n    Serial.begin(115200);\n    SPIFFS.begin();\n    File fr = SPIFFS.open(\"\/config.ini\", \"r\");\n    while(fr.available()){\n        String readStr = fr.readStringUntil('\\n'); \/\/ Read one line\n        Serial.println(readStr);\n    }\n    fr.close();\n}\n\nvoid loop() {\n}<\/code><\/pre>\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Execution_Results\"><\/span>Execution Results<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\"><br>The execution result of the serial monitor is as follows.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-09.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-09.png?resize=768%2C314&#038;ssl=1\" alt=\"Serial Monitor\" class=\"wp-image-24225\" width=\"768\" height=\"314\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-09.png?resize=1024%2C419&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-09.png?resize=300%2C123&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-09.png?resize=768%2C314&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-09.png?w=1131&amp;ssl=1 1131w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Delete\"><\/span>Delete<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A sketch to remove unnecessary desktop.ini that was uploaded along with the manual upload.<\/p>\n\n\n<pre class=\"line-numbers\"><code class=\"lang-cpp\">\/*\n * SPIFFS Test Scketch\n *  \n *\/\n#include \"FS.h\"\n#include \"SPIFFS.h\"\n\nvoid setup() {\n    Serial.begin(115200);\n    SPIFFS.begin();\n    fs::FS fs = SPIFFS;\n    fs.remove(\"\/desktop.ini\");\n}\n\nvoid loop() {\n}<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Write\"><\/span>Write<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A sketch that writes and rereads a file.<\/p>\n\n\n<pre class=\"line-numbers\"><code class=\"lang-cpp\">\/*\n * SPIFFS Test Scketch\n *  \n *\/\n#include \"SPIFFS.h\"\n\nvoid setup() {\n    Serial.begin(115200);\n    SPIFFS.begin();\n    File fr = SPIFFS.open(\"\/config2.ini\", \"w\"); \/\/ Write Mode\n    fr.println(\"confing2 test line1\");\n    fr.println(\"confing2 test line2\");\n    fr.close();\n    \n    File frr = SPIFFS.open(\"\/config2.ini\", \"r\"); \/\/ Read Mode\n    while(frr.available()){\n        String readStr = frr.readStringUntil('\\n');\n        Serial.println(readStr);\n    }\n    frr.close();\n}\n\nvoid loop() {\n}<\/code><\/pre>\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Execution_Result\"><\/span>Execution Result<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">The two lines that have been written are displayed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a class=\"r_image\" href=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-11.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-11.png?resize=768%2C314&#038;ssl=1\" alt=\"File Write Sketch Execution Result\" class=\"wp-image-24231\" width=\"768\" height=\"314\" srcset=\"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-11.png?resize=1024%2C419&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-11.png?resize=300%2C123&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-11.png?resize=768%2C314&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-en-11.png?w=1131&amp;ssl=1 1131w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This concludes this article.<\/p>\n\n\n<div class=\"postscript_balloon\">Finally.<\/div>\n\n\n<p class=\"wp-block-paragraph\">I hope this article will be useful to someone somewhere.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>There was a time when I wanted to save a file on ESP32-WROOM-32 and load it from a sketch program. I found out that SPIFFS can be used.<\/p>\n","protected":false},"author":5,"featured_media":24195,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_locale":"en_US","_original_post":"https:\/\/www.souichi.club\/?p=24153","_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[238],"tags":[],"class_list":["post-24196","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-m5stack","en-US"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n\t<meta name=\"author\" content=\"souichirou kikuchi\"\/>\n\t<meta name=\"google-site-verification\" content=\"I8SUoF98Rb8nTRkWlwcAUglH3v2Z49ZUmVL8-hWcBds\" \/>\n\t<meta name=\"msvalidate.01\" content=\"621A4EE09A712013B79161DEF6085174\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"\u305d\u3046\u5099\u5fd8\u9332 note to self\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Try to read and write files from a sketch using SPIFFS on ESP32 | \u305d\u3046\u5099\u5fd8\u9332\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/\" \/>\n\t\t<meta property=\"fb:admins\" content=\"222762298621510\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.souichi.club\/wp-content\/uploads\/spiffs-15.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.souichi.club\/wp-content\/uploads\/spiffs-15.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t\t<meta property=\"og:image:height\" content=\"1458\" \/>\n\t\t<meta property=\"article:tag\" content=\"m5stack-esp32-arduino\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2021-11-28T11:58:03+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2022-03-19T08:17:41+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sou.bibouroku\/\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/kikuchi.souichiro\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@soukikuchi175\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Try to read and write files from a sketch using SPIFFS on ESP32 | \u305d\u3046\u5099\u5fd8\u9332\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@soukikuchi175\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.souichi.club\/wp-content\/uploads\/spiffs-15.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/m5stack\\\/spiffs\\\/#article\",\"name\":\"Try to read and write files from a sketch using SPIFFS on ESP32 | \\u305d\\u3046\\u5099\\u5fd8\\u9332\",\"headline\":\"Try to read and write files from a sketch using SPIFFS on ESP32\",\"author\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/author\\\/souwpuser023en\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.souichi.club\\\/wp-content\\\/uploads\\\/spiffs-15.jpg?fit=1920%2C1458&ssl=1\",\"width\":1920,\"height\":1458,\"caption\":\"ESP32\\u30e2\\u30b8\\u30e5\\u30fc\\u30eb\"},\"datePublished\":\"2021-11-28T20:58:03+09:00\",\"dateModified\":\"2022-03-19T17:17:41+09:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/m5stack\\\/spiffs\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/m5stack\\\/spiffs\\\/#webpage\"},\"articleSection\":\"M5Stack-ESP32-Arduino\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/m5stack\\\/spiffs\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.souichi.club#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.souichi.club\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/category\\\/m5stack\\\/#listItem\",\"name\":\"M5Stack-ESP32-Arduino\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/category\\\/m5stack\\\/#listItem\",\"position\":2,\"name\":\"M5Stack-ESP32-Arduino\",\"item\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/category\\\/m5stack\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/m5stack\\\/spiffs\\\/#listItem\",\"name\":\"Try to read and write files from a sketch using SPIFFS on ESP32\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.souichi.club#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/m5stack\\\/spiffs\\\/#listItem\",\"position\":3,\"name\":\"Try to read and write files from a sketch using SPIFFS on ESP32\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/category\\\/m5stack\\\/#listItem\",\"name\":\"M5Stack-ESP32-Arduino\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/#person\",\"name\":\"souichirou\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/m5stack\\\/spiffs\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/13f7f455b0e5efb64918fd4bc46f81ae8232f37679b7b638f53ac198086d1422?s=96&r=g\",\"width\":96,\"height\":96,\"caption\":\"souichirou\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/kikuchi.souichirou\",\"@soukikuchi175\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/author\\\/souwpuser023en\\\/#author\",\"url\":\"https:\\\/\\\/www.souichi.club\\\/author\\\/souwpuser023en\\\/\",\"name\":\"souichirou kikuchi\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/m5stack\\\/spiffs\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ae74b378502f0f972ee51f5bed6a401be64ea02df531d9a86cf4cbdd7d68861e?s=96&r=g\",\"width\":96,\"height\":96,\"caption\":\"souichirou kikuchi\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/kikuchi.souichiro\",\"@soukikuchi175\"]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/m5stack\\\/spiffs\\\/#webpage\",\"url\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/m5stack\\\/spiffs\\\/\",\"name\":\"Try to read and write files from a sketch using SPIFFS on ESP32 | \\u305d\\u3046\\u5099\\u5fd8\\u9332\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/m5stack\\\/spiffs\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/author\\\/souwpuser023en\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/author\\\/souwpuser023en\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/www.souichi.club\\\/wp-content\\\/uploads\\\/spiffs-15.jpg?fit=1920%2C1458&ssl=1\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/m5stack\\\/spiffs\\\/#mainImage\",\"width\":1920,\"height\":1458,\"caption\":\"ESP32\\u30e2\\u30b8\\u30e5\\u30fc\\u30eb\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/en\\\/m5stack\\\/spiffs\\\/#mainImage\"},\"datePublished\":\"2021-11-28T20:58:03+09:00\",\"dateModified\":\"2022-03-19T17:17:41+09:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.souichi.club\\\/#website\",\"url\":\"https:\\\/\\\/www.souichi.club\\\/\",\"name\":\"\\u305d\\u3046\\u5099\\u5fd8\\u9332\",\"description\":\"note to self\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.souichi.club\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Try to read and write files from a sketch using SPIFFS on ESP32 | \u305d\u3046\u5099\u5fd8\u9332","description":"","canonical_url":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/","robots":"max-snippet:-1, max-image-preview:large, max-video-preview:-1","keywords":"","webmasterTools":{"google-site-verification":"I8SUoF98Rb8nTRkWlwcAUglH3v2Z49ZUmVL8-hWcBds","msvalidate.01":"621A4EE09A712013B79161DEF6085174","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#article","name":"Try to read and write files from a sketch using SPIFFS on ESP32 | \u305d\u3046\u5099\u5fd8\u9332","headline":"Try to read and write files from a sketch using SPIFFS on ESP32","author":{"@id":"https:\/\/www.souichi.club\/author\/souwpuser023en\/#author"},"publisher":{"@id":"https:\/\/www.souichi.club\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-15.jpg?fit=1920%2C1458&ssl=1","width":1920,"height":1458,"caption":"ESP32\u30e2\u30b8\u30e5\u30fc\u30eb"},"datePublished":"2021-11-28T20:58:03+09:00","dateModified":"2022-03-19T17:17:41+09:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#webpage"},"isPartOf":{"@id":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#webpage"},"articleSection":"M5Stack-ESP32-Arduino"},{"@type":"BreadcrumbList","@id":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.souichi.club#listItem","position":1,"name":"Home","item":"https:\/\/www.souichi.club","nextItem":{"@type":"ListItem","@id":"https:\/\/www.souichi.club\/en\/category\/m5stack\/#listItem","name":"M5Stack-ESP32-Arduino"}},{"@type":"ListItem","@id":"https:\/\/www.souichi.club\/en\/category\/m5stack\/#listItem","position":2,"name":"M5Stack-ESP32-Arduino","item":"https:\/\/www.souichi.club\/en\/category\/m5stack\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#listItem","name":"Try to read and write files from a sketch using SPIFFS on ESP32"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.souichi.club#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#listItem","position":3,"name":"Try to read and write files from a sketch using SPIFFS on ESP32","previousItem":{"@type":"ListItem","@id":"https:\/\/www.souichi.club\/en\/category\/m5stack\/#listItem","name":"M5Stack-ESP32-Arduino"}}]},{"@type":"Person","@id":"https:\/\/www.souichi.club\/#person","name":"souichirou","image":{"@type":"ImageObject","@id":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/13f7f455b0e5efb64918fd4bc46f81ae8232f37679b7b638f53ac198086d1422?s=96&r=g","width":96,"height":96,"caption":"souichirou"},"sameAs":["https:\/\/www.facebook.com\/kikuchi.souichirou","@soukikuchi175"]},{"@type":"Person","@id":"https:\/\/www.souichi.club\/author\/souwpuser023en\/#author","url":"https:\/\/www.souichi.club\/author\/souwpuser023en\/","name":"souichirou kikuchi","image":{"@type":"ImageObject","@id":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/ae74b378502f0f972ee51f5bed6a401be64ea02df531d9a86cf4cbdd7d68861e?s=96&r=g","width":96,"height":96,"caption":"souichirou kikuchi"},"sameAs":["https:\/\/www.facebook.com\/kikuchi.souichiro","@soukikuchi175"]},{"@type":"WebPage","@id":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#webpage","url":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/","name":"Try to read and write files from a sketch using SPIFFS on ESP32 | \u305d\u3046\u5099\u5fd8\u9332","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.souichi.club\/#website"},"breadcrumb":{"@id":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#breadcrumblist"},"author":{"@id":"https:\/\/www.souichi.club\/author\/souwpuser023en\/#author"},"creator":{"@id":"https:\/\/www.souichi.club\/author\/souwpuser023en\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-15.jpg?fit=1920%2C1458&ssl=1","@id":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#mainImage","width":1920,"height":1458,"caption":"ESP32\u30e2\u30b8\u30e5\u30fc\u30eb"},"primaryImageOfPage":{"@id":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/#mainImage"},"datePublished":"2021-11-28T20:58:03+09:00","dateModified":"2022-03-19T17:17:41+09:00"},{"@type":"WebSite","@id":"https:\/\/www.souichi.club\/#website","url":"https:\/\/www.souichi.club\/","name":"\u305d\u3046\u5099\u5fd8\u9332","description":"note to self","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.souichi.club\/#person"}}]},"og:locale":"en_US","og:site_name":"\u305d\u3046\u5099\u5fd8\u9332 note to self","og:type":"article","og:title":"Try to read and write files from a sketch using SPIFFS on ESP32 | \u305d\u3046\u5099\u5fd8\u9332","og:url":"https:\/\/www.souichi.club\/en\/m5stack\/spiffs\/","fb:admins":"222762298621510","og:image":"https:\/\/www.souichi.club\/wp-content\/uploads\/spiffs-15.jpg","og:image:secure_url":"https:\/\/www.souichi.club\/wp-content\/uploads\/spiffs-15.jpg","og:image:width":1920,"og:image:height":1458,"article:tag":["m5stack-esp32-arduino"],"article:published_time":"2021-11-28T11:58:03+00:00","article:modified_time":"2022-03-19T08:17:41+00:00","article:publisher":"https:\/\/www.facebook.com\/sou.bibouroku\/","article:author":"https:\/\/www.facebook.com\/kikuchi.souichiro","twitter:card":"summary_large_image","twitter:site":"@soukikuchi175","twitter:title":"Try to read and write files from a sketch using SPIFFS on ESP32 | \u305d\u3046\u5099\u5fd8\u9332","twitter:creator":"@soukikuchi175","twitter:image":"https:\/\/www.souichi.club\/wp-content\/uploads\/spiffs-15.jpg"},"aioseo_meta_data":{"post_id":"24196","title":null,"description":null,"keywords":null,"keyphrases":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_custom_image_width":null,"og_custom_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"none","tabs":null,"priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"created":"2023-08-23 00:08:04","updated":"2026-05-21 03:53:36","primary_term":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"twitter_image_url":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"limit_modified_date":false,"ai":null,"seo_analyzer_scan_date":null},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.souichi.club\/wp-content\/uploads\/spiffs-15.jpg?fit=1920%2C1458&ssl=1","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts\/24196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/comments?post=24196"}],"version-history":[{"count":15,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts\/24196\/revisions"}],"predecessor-version":[{"id":24241,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/posts\/24196\/revisions\/24241"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/media\/24195"}],"wp:attachment":[{"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/media?parent=24196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/categories?post=24196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.souichi.club\/wp-json\/wp\/v2\/tags?post=24196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}