Comments on: Arduino IDE 2: Install ESP8266 NodeMCU LittleFS Uploader (Upload Files to the Filesystem) https://randomnerdtutorials.com/arduino-ide-2-install-esp8266-littlefs/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Sat, 24 Aug 2024 03:19:51 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Lobie https://randomnerdtutorials.com/arduino-ide-2-install-esp8266-littlefs/#comment-950626 Sat, 24 Aug 2024 03:19:51 +0000 https://randomnerdtutorials.com/?p=148520#comment-950626 In reply to Lobie.

Update:
I solved some of my problems:

changed all baud rates to 74880 removed the gibberish
the WEMOS is printing
” ets Jan 8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 3424, room 16
tail 0
chksum 0x2e
load 0x3fff20b8, len 40, room 8
tail 0
chksum 0x2b
csum 0x2b
v00049680
~ld
” when it boots up. if anyone can explain I would be greatful.

The uploaded file names did not have digits on the end just and extra “.txt”

File file = LittleFS.open(“test_example.txt.txt”, “r”);
is the line of code I had to use to read the file as per your code presented in this tutorial.

Thanks
Lobie

]]>
By: Lobie https://randomnerdtutorials.com/arduino-ide-2-install-esp8266-littlefs/#comment-950225 Thu, 22 Aug 2024 16:14:14 +0000 https://randomnerdtutorials.com/?p=148520#comment-950225 Hi Sara,
Great tutorial thanks.
I followed it all the way through – no issues, everything appeared to work.

would not read the files. “Failed to open file for reading” was all I got.

I am using windows, Arduino IDE 1.8.19
Wemos D1 R2 [not a mini]

After much head banging I have proved most of it works … NOT as expected:
The upload seems to be adding suffixes to the file names.
but now I have proved the text in the files is uploaded correctly.

I have checked my files in ‘data’ file names are:
“test_example.txt”
“file1”

Essentially I am using the program file supplied above, I have added some prints and some extra code at the end to try and understand what is going wrong. OUTPUT TO SERIAL IS :
<
“lots of unprintable and extended char which wont copy & paste which is not exact the same every time then I get”
LitFS_test on Wemos Serial.begin@115200 Aug24 <- my line of print
after Serial.begin()
Failed to open file for reading 1
Failed to open file for reading 2
File Content:
===================== <– my print sttmnt
file1.txt44
file 1
a test file in text format
Aug 2024
test_example.txt.txt55
This is testing text
in littleFS_test.txt

I dun it.
>
I dont understand the unprintables, its like wrong baud rate, but that doesnt make sense because prints everything else fine. It does seem to occur before serial.begin().
Most of it is the text in my text files and is correct.
The file names ??? as you may see :
“file1” has become “file1.txt44”
“test_example.txt” has become “test_example.txt.txt55”

Sorry I have not done a good job of formatting the output, I assure you, my problem is the filename is changed between the data folder and the littleFS

Thank you for any further assistance / guidance

]]>
By: Sara Santos https://randomnerdtutorials.com/arduino-ide-2-install-esp8266-littlefs/#comment-942399 Sat, 27 Jul 2024 14:47:24 +0000 https://randomnerdtutorials.com/?p=148520#comment-942399 In reply to Tim.

What errors did you get?
You just need to replace the word “SPIFFS” with “LittleFS”
Make sure you have your libraries updated as well as the ESP8266 boards in Tools > Boards > Boards Manager.
Regards,
Sara

]]>
By: Larry https://randomnerdtutorials.com/arduino-ide-2-install-esp8266-littlefs/#comment-942372 Sat, 27 Jul 2024 12:26:42 +0000 https://randomnerdtutorials.com/?p=148520#comment-942372 In reply to Tim.

Yeah. Best news lately.

]]>
By: Tim https://randomnerdtutorials.com/arduino-ide-2-install-esp8266-littlefs/#comment-942199 Fri, 26 Jul 2024 23:42:11 +0000 https://randomnerdtutorials.com/?p=148520#comment-942199 Great article thanks. Trying to get this running on an ESP8266 (12F) but I get compile error:
SPIFFS No such file or directory.

After googling, it looks like LittleFS should be used.. Tried replacing SPIFFS with LittleFS in code but loads more errors.
Any suggestions?
Thanks

]]>
By: Sara Santos https://randomnerdtutorials.com/arduino-ide-2-install-esp8266-littlefs/#comment-921696 Wed, 05 Jun 2024 09:49:46 +0000 https://randomnerdtutorials.com/?p=148520#comment-921696 In reply to TKO.

Hi.
Check this tutorial: https://randomnerdtutorials.com/esp8266-web-server-spiffs-nodemcu/
In the code, instead of “SPIFFS” use “LittleFS”.
This example shows how to display the files saved on LittleFS on a web page that you access when you go to your board IP address..
Regards,
Sara

]]>
By: TKO https://randomnerdtutorials.com/arduino-ide-2-install-esp8266-littlefs/#comment-921465 Tue, 04 Jun 2024 13:29:10 +0000 https://randomnerdtutorials.com/?p=148520#comment-921465 Amazing site, I keep coming back here, as it’s filled with working examples, I just cannot find anywhere else – absolutely brilliant! 🙂

Instead of opening a file, I want to open a html very simple default web page that I have uploaded
file = LittleFS.open(“/test_example.txt”, “r”);

so I need my file to read like this File file = LittleFS.open(“/menu.html”, “r”);
but of course, that displays the contents of my HTML file. Instead, I need my local browser to open it.

Is there an easy way to do this, so if someone goes to the local ip address of my microprocessor, I can put a default web page/ menu instead of just some text ?

I am using a NodeMCU (4mb Flash) with IDE v2+ and I can successfully get the text file to upload and be displayed!

Many thanks for your time and your great site!

🙂

]]>
By: Allen Mulvey https://randomnerdtutorials.com/arduino-ide-2-install-esp8266-littlefs/#comment-913187 Mon, 06 May 2024 15:38:14 +0000 https://randomnerdtutorials.com/?p=148520#comment-913187 In reply to Cristian.

I tried to use it for TFT_eSPI_OpenWeather_LittleFS which puts all the icons, fonts, etc. into folders. Upon checking, all the folders were empty. Apparently it only copies root level items. I made a sketch that copies all files and folders from an SD card to the LittleFS file system. It can be found here:
https://www.mulvey.us/Copy_SD_to_LittleFS.zip
You need to partition the file system the same way you will use it in the final sketch.
It also does a touchCalibrate and saves the calibration file. You can REM out that command if you don’t need it.

]]>
By: Cristian https://randomnerdtutorials.com/arduino-ide-2-install-esp8266-littlefs/#comment-913144 Mon, 06 May 2024 11:48:52 +0000 https://randomnerdtutorials.com/?p=148520#comment-913144 In reply to Sara Santos.

I have tested it and works good.
Thanks to you

]]>
By: Sara Santos https://randomnerdtutorials.com/arduino-ide-2-install-esp8266-littlefs/#comment-913136 Mon, 06 May 2024 11:17:28 +0000 https://randomnerdtutorials.com/?p=148520#comment-913136 In reply to Cristian.

Hi.
That’s great!
Thanks for letting me know. I’ll test it and create a tutorial about it ASAP.
Regards,
Sara

]]>