#203

  Переглядів 66,729

Ralph S Bacon

Ralph S Bacon

День тому

So we have the equivalent of a very small SSD in each of our ESP8266s and ESP32s but it mostly remains unused. Instead of using SD cards for trivial files let's use the built in flash file store.
JLCPCB Only $2 for PCB Prototype any colour jlcpcb.com/
00:00 Welcome Back!
01:06 Sponsor Message - JLCPCB jlcpcb.com/
02:09 Video continues
04:22 SPIFFS explained
07:25 Installing the LITTLEFS.h library
09:30 Installing the "data file upload" tools into the IDE (one-time operation)
13:10 The ESP32 parameters for the SPIFFS partition and more!
18:02 Uploading our files from the DATA folder
19:12 Uploading the sketch to read those files
20:31 The sketch walk-through
23:46 Summary
See more info: github.com/RalphBacon/203-SPI...
SPIFFS stands for SPI Flash File System. A bit like your SSD in your PC.
SPI is a protocol that is often used in the Arduino arena (it stands for Serial Peripheral Interconnect, but that's why we call it SPI).
Flash is the memory on your μController. Yes, your sketch resides in Flash memory.
File System is the term for storing "files" in that memory. Yes, just like on that SD card.
So we can store files in this SSD-like memory on our ESP8266s and ESP32s? Yes, but not on an Arduino UNO or similar because we just don't have anywhere near the memory required for this.
The bad news is that SPIFFS has been deprecated by Espressif (the designers of ESP8266/ESP32) because it was not resilient enough. And relatively slow, too.
The replacement LITTLEFS is even power-interruption resilient and the File System will not be corrupted if the power disappears during a write operation. Allegedly. Even if one file gets corrupted, the rest are safe.
Espressif state: "SPIFFS is the original filesystem and is ideal for space and RAM constrained applications that utilize many small files and care about static and dynamic wear levelling and don’t need true directory support. Filesystem overhead on the flash is minimal as well."
Read more on my GitHub: github.com/RalphBacon/203-SPI...
List of all my videos
(Special thanks to Michael Kurt Vogel for compiling this)
bit.ly/UKpostsVideoList-RalphB...
Benny's Life Story, Best Cat Ever.
wordpress.com/post/ralphbacon...
-----------
INFORMATION
-----------
Official document regarding SPIFFS vs LITTLEFS
arduino-esp8266.readthedocs.i...
All about the ESP32 - features guide
www.exploreembedded.com/wiki/...
List of all my videos
(Special thanks to Michael Kurt Vogel for compiling this)
bit.ly/UKpostsVideoList-RalphB...
-----
ESP32
-----
ESP32 Universal SPIFFS, LITTELFS and FATFS tools for Arduino IDE
github.com/lorol/arduino-esp3...
github.com/lorol/arduino-esp3...
Dennis Phillips (viewer) says:
I thought it might be worth mentioning that for users of PlatformIO the tools are also available. github.com/lorol/LITTLEFS/tre...
Thanks Dennis!
Note: You need the following 3 files:
esp32fs.zip, mkfatfs.zip and x86_64-64.minw32-mklittlefs-....zip
Above is a fork from the original code here:
github.com/me-no-dev/arduino-...
-------
ESP8266
-------
Arduino IDE ESP8266 filesystem:
github.com/earlephilhower/ard...
github.com/earlephilhower/ard...
Note: You need the following 1 file:
ESP8266FS-0.5.0.zip (if there is a higher version, take it)
--------
PRODUCTS
--------
ESP32 modules are inexpensive these days. Here are a few examples.
The links might be affiliate links which can earn my channel some money to buy more stuff. Just click on a link before you buy anything from Banggood, Aliexpress or Amazon (UK).
ESP32 Development Board WiFi+Bluetooth Ultra Low Power Consumption Dual Cores About $7 + shipping
www.banggood.com/custlink/mvG...
Similar board, but cheaper at $4.99 (on sale until 31 Dec 2020):
www.banggood.com/custlink/DKG...
Note: from China, USA and UK
ESP8266 (bare - no USB socket) $3.99
www.banggood.com/custlink/K33...
ESP8266 by Geekcreit® NodeMcu Lua CH340G V3 with USB socket $4.99
www.banggood.com/custlink/vDD...
Two line (16 x 2) LCD display, Black/Green, very easy to use with I2C only £3.99
amzn.to/34fEOhG
ESP32-DevKitC core board ESP32 development board (ESP32-WROOM-32D or 32U) $3.99 plus shipping
s.click.aliexpress.com/e/_AASDSr
If you like this video please give it a thumbs up, share it and if you're not already subscribed please consider doing so and joining me on my Arduinite journey
My channel, GitHub and blog are here:
/ ralphbacon
ralphbacon.blog
github.com/RalphBacon

КОМЕНТАРІ: 342
@dnarobo
@dnarobo 3 роки тому
"...gosh, this video is gonna go on forever...", and the audience grins gladly and grabs for another sip of coffee. Always a pleasure to watch/listen to this channel, the longer the better. Can't wait to see the OTA aspects, I think then I have a use case for switching from a SD card method.
@RalphBacon
@RalphBacon 3 роки тому
Well said! I thought you were complaining about the length but it seems not. 😃 I realised that it *did go on a bit* but then again I'm trying to accommodate beginners who need hand-holding every step of the way. If anyone is reading this who thinks it is a bit step-by-step, try increasing the playback speed to 1.25x or even 1.5x - I do this with a lot of videos, especially the American ones who just drawl out every word and don't know how to speak quickly (unless they're from New York, of course). Just kiddin' folks. Sort of. 🤣
@RobertShaverOfAustin
@RobertShaverOfAustin 3 роки тому
@@RalphBacon The other day I had to slow one down he talked so fast. This one I bumped up to 1.5X, which was perfect for me. I've been a *SUBSCRIBER* for quite a while. This one was right up my ally. I've been thinking about a project that could use this file capability. Is the code there to be able to download files via WiFi? That's what I need to be able to do.
@RobertShaverOfAustin
@RobertShaverOfAustin 3 роки тому
Oh, I forgot to mention, when I went to the Banggood link, the ESP32 is selling for $10 now.
@RobertShaverOfAustin
@RobertShaverOfAustin 3 роки тому
I found another one on Banggood USA for $4.33 + $0.25 shipping. usa.banggood.com/Geekcreit-ESP32-WiFi+bluetooth-Development-Board-Ultra-Low-Power-Consumption-Dual-Cores-Pins-Unsoldered-p-1214159.html?gmcCountry=US&currency=USD&createTmp=1&cur_warehouse=CN
@noweare1
@noweare1 3 роки тому
@@RobertShaverOfAustin They are $10 from Mouser in the states.
@OsoPolarClone
@OsoPolarClone 3 роки тому
Looking forward to the OTA video on this.
@RalphBacon
@RalphBacon 3 роки тому
You and me both!
@noweare1
@noweare1 3 роки тому
Really good timing. Learning about spiff is/was on my todo list but now it will be littleFS. Thanks for saving me the time. Just started learning about esp32 about 2 months ago. They are just incredible modules. So much we can do with them.
@RalphBacon
@RalphBacon 3 роки тому
Glad I could help! The ESP32 is certainly a processor I have not used enough, but that is about to change!
@CTCTraining1
@CTCTraining1 3 роки тому
I do like the clear warnings about when and where you can use such libraries ... much time can be saved and dead ends avoided if everyone was as straightforward as you Ralph. Many thx.
@RalphBacon
@RalphBacon 3 роки тому
Thanks, Chris, glad you like the video.
@yvesinformel221
@yvesinformel221 3 роки тому
good technical stuff, a lot of UKposts are just showing you the very basic things like how to blink an LED. You're one of the few showing more advance stuff.
@RalphBacon
@RalphBacon 3 роки тому
And what's wrong with a blinking LED, Yves!? I used that in my assembler demo only a week or so back! But I understand your point, and I'm glad you like this sort of video.
@yvesinformel221
@yvesinformel221 3 роки тому
@@RalphBacon Hi Ralph I have nothing against the basic, it's just that some UKpostsr are just taking back the examples and show them and they don't go any further.
@Lar_ry
@Lar_ry 2 роки тому
Sir, from the bottom of my heart THANK YOU! You don't know what kind of hell you helped me out of. Thanks you so much! Much Love!
@RalphBacon
@RalphBacon 2 роки тому
Glad I could help! You sound very pleased, so I'm happy you got it sorted.
@RakshithPrakash
@RakshithPrakash 3 роки тому
I really enjoy your videos, so glad I can learn these cool stuff for free! Thank You
@RalphBacon
@RalphBacon 3 роки тому
Glad you like them!
@davidkempton2894
@davidkempton2894 3 роки тому
Thanks for sharing all this info, Ralph. Very useful and interesting!
@RalphBacon
@RalphBacon 3 роки тому
Glad you enjoyed it!
@AirzonesBlasters
@AirzonesBlasters 3 роки тому
The delivery is always entertaining lol.
@RalphBacon
@RalphBacon 3 роки тому
I'm glad you think so!
@keen2461
@keen2461 3 роки тому
Your videos are excellent. Thanks for sharing your knowledge.
@RalphBacon
@RalphBacon 3 роки тому
Glad you like them!
@rzinindiana8029
@rzinindiana8029 3 роки тому
Thankyou... did not know I needed to know these things.. yet. This was and excellent bit of future training. OD
@RalphBacon
@RalphBacon 3 роки тому
Always good to be aware of the direction the industry is moving!
@TYGAMatt
@TYGAMatt 3 роки тому
Great that you'll now be doing a long series of videos with the ESP32 ;-) Looking forward to it with anticipation
@RalphBacon
@RalphBacon 3 роки тому
That's the plan! But I won't be abandoning my loyal Arduino viewers either. Keep tuned.
@TYGAMatt
@TYGAMatt 3 роки тому
@@RalphBacon sweet. The Arduino is very capable tool. As we speak my main project is with the ESP32, but I have three others on the go using Nanos.
@RalphBacon
@RalphBacon 3 роки тому
That perfectly describes me too! Except I have 17 projects on the go. Not all will live to see the light of day. 😔
@TYGAMatt
@TYGAMatt 3 роки тому
@@RalphBacon thankfully these microcontroller projects are just for fun so no pressure. The long list of 'priorities' in my real job makes sure that I don't have a great deal of time for hobbies LOL.
@OtusAsio
@OtusAsio 3 роки тому
Always interesting videos... there are so many things to do with that addon... thank you and looking forward to "maybe" more about it, like exchange of data into the program or compiling data from a "bee hive"... Take care.
@RalphBacon
@RalphBacon 3 роки тому
More to come! Definitely worth exploring but getting the files back out onto a PC is also important so that's on my list too.
@johncongerton7046
@johncongerton7046 Рік тому
Clear, concise, complete : thanks
@RalphBacon
@RalphBacon Рік тому
Glad you liked it, John!
@mikea683
@mikea683 3 роки тому
I really enjoyed this video dude. I notice there are a bunch of people in the comments who think they can do better so I'm looking forward to their videos. Keep up the good work!
@RalphBacon
@RalphBacon 3 роки тому
I appreciate it, Mike!
@Bianchi77
@Bianchi77 Рік тому
Nice info, thanks for sharing :)
@RalphBacon
@RalphBacon Рік тому
Thanks for watching!
@DeonMitton
@DeonMitton 2 роки тому
Very helpful ! Thanks a lot !
@RalphBacon
@RalphBacon 2 роки тому
Glad it was helpful!
@khetimachineryindia
@khetimachineryindia 3 роки тому
Very well explained...thanks for posting it....
@RalphBacon
@RalphBacon 3 роки тому
Glad it was helpful!
@MagicSmoke11
@MagicSmoke11 3 роки тому
Thanks Ralph....We need more videos on ESP32 ...😊👍
@RalphBacon
@RalphBacon 3 роки тому
Working on it!
@TYGAMatt
@TYGAMatt 3 роки тому
Agreed
@ianwilson9716
@ianwilson9716 2 роки тому
Thank you. This cleared up all my questions. One thing, after selecting the ESP sketch data upload I was not given the type of SPIFFS system options of LittleFS or SPIFFS as shown in your video. It just proceeded to upload on the assumption is was littleFS
@RalphBacon
@RalphBacon 2 роки тому
Hmm, you should get the option. What would happen if you suddenly did want to use SPIFFS again? Check that all is installed correctly!
@ianwilson9716
@ianwilson9716 2 роки тому
@@RalphBacon I would not know if it installed correctly or incorrectly. What would the process be to correctly install and what/how could I uninstall and reinstall?
@davidstonier-gibson8408
@davidstonier-gibson8408 Рік тому
I love your style, Ralph. No duffa duffa music. No mouse flying every which way at light speed. And no wasting 15 seconds of my time with an opening "See what I can do!" flashy title sequence. Just a calm dialogue in understandable English and in sufficient depth to get the essential information across without befuddling even my ageing brain. Things have become so much more complex now than when I did my first embedded development ca 1974! I am now happily retired, and working on a design for a gadget for my club that must store a series of events and remotely (WiFi) supplied information. I have included an SD card because I feared using the ESP32 flash might compromise the potential for OTA updates, but you put my mind at rest in that regard. Is there any attempt at wear levelling in LittleSPIFS that you are aware of, or must I worry about that myself. And do you happen know what the endurance is for the ESP32 flash? Thanks again.
@RalphBacon
@RalphBacon Рік тому
I'm also developing a (web-enabled) project, David, that includes the use of LittleFS for storing events... small world! I don't think wear levelling is an issue for flash storage, although you could use an SD card module as "backup", I suppose. We can write many thousands of times to flash memory, so unless you're continuously writing several events a minute it won't become an issue, I don't think. I'm using an ESP32 so that I get Wi-Fi, Web, OTA and SD card plus considerable flash storage too (up to 16MB). I can also get PSRAM if I need it (seems a shame not to use it!)
@murrij
@murrij 3 роки тому
Very cool. I use SPIFFS a lot and didn't even know about LittleFS. Thank you!
@RalphBacon
@RalphBacon 3 роки тому
Happy to help!
@emmanuelsheshi1553
@emmanuelsheshi1553 Рік тому
thanks so much.. excellent tutrials
@RalphBacon
@RalphBacon Рік тому
You're very welcome!
@patazertyui
@patazertyui 3 роки тому
Very interesting video, thank you!
@RalphBacon
@RalphBacon 3 роки тому
Glad you enjoyed it!
@MUHAMMADYAWARIFRAHEEM
@MUHAMMADYAWARIFRAHEEM 3 роки тому
Very informative video SIR 👍
@RalphBacon
@RalphBacon 3 роки тому
So nice of you!
@effevee
@effevee 3 роки тому
Hi Ralph, Excellent video as usual ! Learned something new :-) I'm curious about the solderless breadboard you use in your video. I have never seen one of those. Do you have a link where you buy one of those ? Thanks.
@RalphBacon
@RalphBacon 3 роки тому
Yes, absolutely: I bought the breadboard from Amazon UK back in 2014 for my PIC work. amzn.to/37XFqLt If you are not in the UK then Amazon.de is your best bet: www.amazon.de/WOVELOT-Point-L%C3%B6tfreie-Brotplatte-Jumper/dp/B07T4KBLXY/ref=sr_1_1 it seems to be the same item even though the brand is different.
@stephenrogers5458
@stephenrogers5458 2 роки тому
I am in the process of porting my Arduino MKR wifi 1010 data logger to ESP32, and building it on PlatformIO, using freeRTOS for at least some key parts of it. This is the new platform and toolchain for my beta. As I'm doing the R&D, I have been running across LittleFS and SPIFFS references in various documentation, but didn't understand the context. Likewise I see the ESP32 specs with all these wonderful built-in features and resources so I'm drawn to investigate how to put it all together take advantage and make the best possible product. Thanks for packing so much useful knowledge in an easy to consume format! Where is that subscribe button.... 😃
@RalphBacon
@RalphBacon 2 роки тому
I certainly think that PlatformIO / Visual Studio is a great platform for ESP32 development, Stephen. But, to be fair, they've had a long time to get it right. Once Arduino.cc pulls out its finger their Arduino IDE 2.0 might be a contender; less technical than PlatformIO therefore better suited to beginners. They previously mentioned "beginner" and "advanced" modes - but nothing on that front (yet). I'll be sticking with VS/PlatformIO for the foreseeable future! I hope you do subscribe (and tick the notification bell so you don't miss a video)! Welcome to my channel. 👍
@basiljackson3829
@basiljackson3829 9 місяців тому
Hello Ralph. Thanks for the video. FWIW I followed the instructions "To a T" and... it didn't work. I checked, double checked, scratched my head... and investigated. For some reason, there was a mismatch in the location of my sketches. File->Preferences said one thing, but preferences.txt said something different (and was wrong). Correcting the entry in preferences.txt worked magic and, voila, the tool showed up! Maybe someone will find this useful. Thanks again! As I dive more into ESP32, you are becoming one of my favorite UKpostsrs.
@RalphBacon
@RalphBacon 9 місяців тому
I might become one of your less favourite UKpostsrs when I tell you that the most recent framework from Espressif has the SPIFFs _as standard_ and you need to absolutely nothing other than include the SPIFFs library. Works for Arduino IDE or PlatformIO and the recent-ish ESP32 framework(s).
@hughieandrolf
@hughieandrolf Рік тому
Excellent channel Ralph. Easy to follow presentation style and really useful and interesting content! Thanks. Is there an update that allows the plug-in to work with Arduino IDE 2.0.3?
@RalphBacon
@RalphBacon Рік тому
You are talking about "the plug-in" in what sense? Just in case, the ESP32 framework (eg when programming with either Arduino IDE 2.0.x or Visual Studio PlatformIO has the LittleFS installed BY DEFAULT now and you need do nothing except use it out of the box. Well, OK, you need to add #include at the top of your code, but that's it. Simples.
@hughieandrolf
@hughieandrolf Рік тому
@@RalphBacon Thanks for the fast response Ralph. The plugin that appears in the Tools menu "ESP32 Sketch Data Upload"?
@RalphBacon
@RalphBacon Рік тому
In the Arduino IDE, yes, it's under Tools.
@aryeguetta8592
@aryeguetta8592 3 роки тому
Hoora!!! Finally using the 'full' capacity of the ESP32 Chip! and also no need for an SD card (almost!) - Can we use the LittleFS as a true FS - meaning writing files from the sketch itself? like a logger with size limitation that we can add for the ESP32. that way we can use it AS IS (no extra HW needed) in the field to collect data for us also! it will send the data to our man server of course - But we will have a portion of the latest data on the CHIP itself if we want to have a local backup or to read it from a different location using UART connection with the board. As always Great Video Ralph!! Thanks
@RalphBacon
@RalphBacon 3 роки тому
Yes, Arye, you can treat LITTLEFS (and SPIFFS) as though they were files on an SD card and write/append to them (logging), create them, delete them, create directories (LITTLEFS only) or just read them (eg WiFi SSID & password). Getting the files back off the partition is easy and I'll have to do another video on that.
@mrtom64
@mrtom64 3 роки тому
I discovered SPIFFS was on its way out earlier this week, I guess we are on the same hymn sheet! I converted a project to LittleFS on an 8266 but I didn't need to install anything, LittleFS is already included in the ESP8266 package....the include statement doesn't need to be capitalised either. Thanks for the upload.
@RalphBacon
@RalphBacon 3 роки тому
Definitely the same hymn sheet! But I had to capitalise the LITTLEFS.h or else it would not compile. Strange. Perhaps I am using a different library to you? Whatever, it works just fine! And I'm using it again in next week's video on... well, wait and see!
@mrtom64
@mrtom64 3 роки тому
@@RalphBacon Yeah, I don't have an ESP32 so no idea what its package comes with....maybe thats why the library install is called LittleFS_esp32 ? It's not needed for the 8266? Also, and I'm sure you are aware of this, there are several browser based file editors, (explorers), for SPIFFS/LittleFS. You can upload, create, edit, open, download and delete files directly from the file system through your web-browser....removes the need to keep uploading from the 'data' folder. Pretty handy.
@RalphBacon
@RalphBacon 3 роки тому
Yes, it seems the only way to download stuff. Gosh! I was doing the HTML web page stuff years ago on this very channel. Sounds as if I will be repeating it on a much faster processor. Exciting times!
@watts-on-tube
@watts-on-tube 3 роки тому
Thanks for taking the time to produce your informative and entertaining videos. I was inspired to have a go at building the web radio using the same T8 V1.7.1 wrover board, which I checked has the version 1 silicon. But I was hitting the same wall as others here with the mklittlefs utility and Arduino. I was able to get the upload option it to appear in the menu ok, but despite copying the utility to several locations, it always failed with the mklittlefsnot found error. I was about to give up when I spotted a clue in your video at time 18:41, where Arduino appears to be using the tool form an esp8266 folder. So I installed esp8266 support into Arduino and tada.. it worked perfectly. :-) I'm now having trouble getting the WiFi to connect, but that's another story..
@RalphBacon
@RalphBacon 3 роки тому
Thanks for letting me know this, as I could not understand why some people (too many) were having problems in this area. The ESP8266 and ESP32 methods seem to be linked in some way.
@mikedunning265
@mikedunning265 Рік тому
Love the channel Ralph, and great tutorial, I've use SPIFFS and Little FS for a few projects thanks to this video. Quick question, I have a bunch of the new ESP32C3 RISC V boards and the original Arduino file uploader will not work with the RISC V boards. I have searched for an updated version but to no avail. Have you encountered this issue? or do you have an alternate option?
@RalphBacon
@RalphBacon Рік тому
Try adding in the following board URL (File>Preferences): raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json Then choose "ESP32C3 Dev Board". That should allow the code to upload. If not let me know here!
@RalphBacon
@RalphBacon Рік тому
Lots of information on DFRobot's version of their DEV board (DF Beetle) which uses the ESP32C3 RISK chip: wiki.dfrobot.com/SKU_DFR0868_Beetle_ESP32_C3
@RalphBacon
@RalphBacon Рік тому
@Mike Dunning By following my own advice I got my ESP32-C3 Beetle up and running, did you find success also?
@mikedunning265
@mikedunning265 Рік тому
@@RalphBacon I've managed to get spiffs running ok on the various broards and can create read and delete files etc using tge example spiffs sketch. What does not work is the utility for uploading files like html, .js, css, jpegs etc from the Data folder on the laptop drive into the spiffs partition. I'm using spiffs and little fs locally stored files for a remote webserver that has no internet access so everything needs to be in spiffs/little FS. Usually anything in the data folder under the sketch can be uploaded using the esptool file upload utility in Arduino IDE but not for RISC V boards. Given the architecture difference it makes sense that some of the tools might not work but I cannot find and update to the esptool upload utility. I've updated all my versions for libraries etc, but it specifically seems to be the utility tool that was published in 2019. github.com/me-no-dev/arduino-esp32fs-plugin/releases/ I've had a look at Rui Santos examples too. randomnerdtutorials.com/install-esp32-filesystem-uploader-arduino-ide/ bit stuck at the moment
@willofirony
@willofirony 3 роки тому
Well, I have yet to use SPIFFS or LITTLEFS . Nevertheless it is always irksome to know there is spare capacity on one's MCU. This appears to be an excellent answer to that problem (I can feel my OCD melting away as I write). I suspect it could also be used to facilitate a more sophisticate UI . Excellent video, Ralph. It is a gift to be able to present a subject that most of your subscribers (including one's self) have not thought about and yet still make it interesting. Expanding one's horizons is free, I take it?
@RalphBacon
@RalphBacon 3 роки тому
I did a video on creating a simple web page ("site" is too grand a word) on an Arduino LAN shield a long time ago. Very limited memory but it worked. Now we have LOTS of memory available so we could have some very flashy (and useful) webpages from an ESP32. I'm glad you like this, Michael, go and dust off that ESP32 module and make it do something! Or wait a couple of weeks for my Internet Radio project (playing as I type this, bliss!).
@willofirony
@willofirony 3 роки тому
@@RalphBacon Internet Radio Project, Now you are talking!!!!
@paulyorke1437
@paulyorke1437 3 роки тому
Hi Ralph. Long time no..... I did struggle a little with this video. Certainly up to the best of your usual entertaining/teaching techniques. Watched it a few times before things came together for me. I also experienced some mklittlefs file errors like others. The compiler just wouldn't find the file when located in a new tools directory where all the sketches are. Thanks to other comments below I ended up placing the exe in C:\Users\myfiles\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\tools. I'm using IDE version 1.8.12 . I did try 13 when it was introduced but found I could no longer flash Atmega328P chips so reverted to 12. Anyway, thanks for a chance to grow my (meagre) knowledge. I haven't played with the ESP32 much since buying it so am looking forward to seeing future videos on this subject. Keep up the good work...
@RalphBacon
@RalphBacon 3 роки тому
In hindsight I could have split last week's video into two, there was so much to cover. But it seems that many have figured it out. Strange about the location of the tools directory, others have mentioned that too, but not for me. Yes, the ESP32 is certainly powerful and cheap enough to replace an Arduino Uno/Nano if you need WiFi and/or BT.
@MichalKottman
@MichalKottman 3 роки тому
FAT a.k.a. File Allocation Table, is a really old relic filesystem coming from the age of floppy disks, DOS and later Windows, its "newer" version FAT32 (from 1996) is still used on USB/Flash drives (for better or worse).
@RalphBacon
@RalphBacon 3 роки тому
True, Michael, and I wouldn't use FAT on a modern USB stick but maybe for LITTLEFS it has a good place? My only concern is resilience. LITTLEFS is more like NTFS in that respect.
@MichalKottman
@MichalKottman 3 роки тому
@@RalphBacon Yes, FAT has a tendency to easily get corrupted if you look at it wrong :-)
@gpTeacher
@gpTeacher 3 роки тому
Terrific Ralph! Great new set of knowledge. Here's a future video suggestion if it appeals to you: Right now, I'm storing a series of 1 bit bitmap images in a sketch as byte arrays. So they're part of the sketch size and that limits the number of images I can store. Then I display the images on an ePaper display using the image commands from the gxEPD2 library. Is there a way that I can store the .bmp images as .bmp FILES onto the LittleFS system and then load them directly onto the ePaper using the gxEPD2 library. That would be cool as I wouldn't be hitting the sketch max size limit! Just something for future consideration. Thank you again for a great video Ralph. Gord
@RalphBacon
@RalphBacon 3 роки тому
That's exactly what you can do, Gord. Load the bmp files into the 'data' folder in your sketch's directory then upload into the LITTLEFS partition (must fit, obviously). Then read the file from there just as you would normally and output to the ePaper screen. You probably know the details of each step, just use the LITTLEFS system to store the file.
@francbele
@francbele 2 роки тому
Really great tutorial and thanks for the heads-up about LittleFS, it's a great library! Have you ever tried to open and read or write to a file in the loop() method? I am getting Guru Meditation Error and I can't get around it. Thanks.
@RalphBacon
@RalphBacon 2 роки тому
Are you doing this on an ESP32? Make sure your initialisation of the SD card is only done in the setup( ); however, ensure your creation of the SD object is done before the setup( ), otherwise when setup() finishes the object does too.
@francbele
@francbele 2 роки тому
@@RalphBacon Yes I am doing that on ESP32, you can see the detailed explanation also here: bit.ly/3xKio4x I am not using SD card, I want to use module's own storage. I am using a flag, when the file should be opened and read from. I also tried to do the initialization in the setup() and the just do the reading in the loop, but also with no avail.
@francbele
@francbele 2 роки тому
@@RalphBacon I have found the solution to my problem by increasing the stack size of the task when pinned to core. Thanks anyway. Regards
@RalphBacon
@RalphBacon 2 роки тому
Glad you got it sorted! I always put a check in my tasks that gets printed every few minutes to make sure I'm not running out of memory: unsigned long remainingStack = uxTaskGetStackHighWaterMark(NULL); log_v("Free stack:%lu", remainingStack);
@francbele
@francbele 2 роки тому
@@RalphBacon Thanks. I know this one. At that time I just didn't think of the stack. But ESP32 has enough storage if one sets stack a bit higher.
@hacker6695
@hacker6695 Рік тому
Great Tutorial...!! It would be a bonus if you show us how to add data from sensors to text file ? and same accessible using webserver ?
@0samfisher
@0samfisher Рік тому
Same thing i need to do! 👍
@RalphBacon
@RalphBacon Рік тому
The process writing to a text file in the SPIFFS/LittleFS partition is exactly the same as writing to an SD card. Instead of calling SD.xxx we use FS.xxx so get one working and the other will too.
@karanbirsoin9983
@karanbirsoin9983 3 роки тому
Hi Ralph Bacon! Interesting video. Got the setup for ESP32FS. Where do we get the plugin for ESP8266?
@RalphBacon
@RalphBacon 3 роки тому
The ESP8266 is now linked to in my GitHub but I've now also added it to the video description. (I originally pasted the wrong link, spotted by a viewer).
@amisadaipc691
@amisadaipc691 3 роки тому
Nice, thanks!
@RalphBacon
@RalphBacon 3 роки тому
My pleasure!
@jonathanr4242
@jonathanr4242 2 роки тому
Excellent video.
@RalphBacon
@RalphBacon 2 роки тому
Thank you very much!
@oleeide9763
@oleeide9763 3 роки тому
Excelent video, and perfect timing just in time for lunch :-) A few comments, most EPS8266 mostly all except the ESP01 includes a 4MB spi memory chip, if you have an ESP01 with 512KB or 1MB, Andreas Spiess has a video how too uppgrade it, Ive done a few times, and Im definatly not an smd guy, love my troughhole and its big solderpads, and only managed to brick one ESP01.. Any way Andreass video is this one : #34 ESP-01/ESP-07 4Mbyte Memory Upgrade and OTA .
@RalphBacon
@RalphBacon 3 роки тому
Thanks for the info! And enjoy your lunch!
@woodworking3815
@woodworking3815 3 роки тому
@@RalphBacon All my ESP12(E/F) modules including the NodeMCU came with 4MB ROM. My ESP07s have 1MB ROM. So in my experience only the ESP01 module has less than 1MB ROM.
@RalphBacon
@RalphBacon 3 роки тому
@Wood Working as ESP32 modules (bare) are now available with 64Mb I wonder how long before they find their way into the modules we use? 64MB! I thought 640Kb would be enough for anyone? (Sorry, Mr Gates III, I couldn't resist).
@woodworking3815
@woodworking3815 3 роки тому
@@RalphBacon I agree, if you are new to WiFi-enabled MCUs there is no reason to buy ESP8266 based modules. All I want point out is, if you already have ESP12 modules sitting idle, they can be used to follow your tutorial.
@RalphBacon
@RalphBacon 3 роки тому
Good point!
@normcaissie5598
@normcaissie5598 3 роки тому
Thanks Ralph
@RalphBacon
@RalphBacon 3 роки тому
My pleasure, Norm!
@BaronVonBiffo
@BaronVonBiffo 3 роки тому
I hadn't previously realised that that your affiliate links applied to anything I purchase. I'll be using them from now on.
@RalphBacon
@RalphBacon 3 роки тому
Apparently that's the way any affiliate link works (surprised me too), but it's only in force for about 24 hours so you have to click the link (and buy something) within that time-frame for it to benefit my channel. Or come back at some future time and click it first, then buy something. Thanks for supporting the channel!
@TalismancerM
@TalismancerM Рік тому
Note that you can't add tools to the tool menu anywhere in the Arduino IDE v2+. If you want to do this you need to install pre version 2 eg v1.8.19. In that version your tools will magically appear. This issue has been in the Git repository since the change-over so I doubt they intend to fix it. Also don't forget to turn off the serial monitor while uploading otherwise you'll get a cryptic error.
@RalphBacon
@RalphBacon Рік тому
You say they might not ever fix it, but it might just be item #3,196 on the list so it could take a while to get done. Maybe. Or you could be right. 🤷‍♂️
@TalismancerM
@TalismancerM Рік тому
@@RalphBacon The problem they have is that the older version was in Java and that enabled a *.jar file to be added easily while the newer version is apparently built using Electron (C++ based). But you're right...they may work out something.
@hafey80
@hafey80 2 роки тому
Great!, thank!
@RalphBacon
@RalphBacon 2 роки тому
Glad you liked it!
@StigBSivertsen
@StigBSivertsen 3 роки тому
Really useful video.. again... :-) My ESP32 crashed every second day and I didnt have an SD card reader and where really wondering how in earth I could log the data.... now I know..... and speaking of tools, is it allowed to recommend "ESP Exception Decoder"....
@RalphBacon
@RalphBacon 3 роки тому
Great to hear! Yes, the ESP EXception Decoder (from Espressif: github.com/me-no-dev/EspExceptionDecoder ) is a great tool for deciphering the dump that happens when things go wrong, thanks for mentioning it.
@gazzacroy
@gazzacroy 3 роки тому
wow you can get to the moon on that one lol... i must look into these little things as someone whos just getting into this things man what a learning curve.. thank goodness for coffee and packet of fruit shortcake :) top stuff fella .. mind is blown away..
@RalphBacon
@RalphBacon 3 роки тому
I hope you enjoyed the cuppa and fruitcake - and the video!
@Magic-Smoke
@Magic-Smoke 3 роки тому
Thanks Ralph. Worth mentioning that if you choose to format your fs, it will take a little time - your app hasn't crashed or frozen. Just wait and all will be well.
@RalphBacon
@RalphBacon 3 роки тому
Great tip! Yes, I've formatted it all a couple of times and things just "froze" for a while. It depends on how much memory you have, of course.
@Magic-Smoke
@Magic-Smoke 3 роки тому
@@RalphBacon indeed it does! I got some 16mB esp32s a while back and they do take a while!
@RalphBacon
@RalphBacon 3 роки тому
How do you use the 16Mb ones, John? Do you have a breakout board for them, or design your own PCB perhaps? I'd love one but the lack of breakout board prevents me doing this.
@Magic-Smoke
@Magic-Smoke 3 роки тому
@@RalphBacon I don't have a development board for them. I generally fit them to a custom board like this: ukposts.info/have/v-deo/p6ZhfISEnZyftY0.html This is a smart fridge controller for my boat. I really must do another (proper) video on it since I now have a v2 board (with no bodge wired - lol). If you have hot air you could slide one of the new ones onto an existing board? They were only a few pence more than the 4Mb version and way cheaper than LCSC.
@RalphBacon
@RalphBacon 3 роки тому
Custom PCB, very nice. I do have hot air gun stuff, I wonder if I could replace one without frying everything else...
@flemmingchristiansen2462
@flemmingchristiansen2462 3 роки тому
As usual - great video. A file system do lift the esp to another level. 1 mega byte of code is an awful lot of coding, just imagine typing 1 million characters. It would be great to learn how to send and receive files. Maybe how to use a received file that changes data strings or how the program runs. By the way, how is things going with your "Self Balancing Bot"?
@RalphBacon
@RalphBacon 3 роки тому
Indeed, and remember the 1Mb of code is the _compiled_ code (the hex file, just a list of one character numbers). If we accept that compiling even an empty sketch takes a few hundred Kb for all the overheads, to get a 1Mb hex file would take some doing! BTW My self balancing bot falls over less frequently now but he is resting on the workbench whilst I work single handedly on my videos and C++ as I, very sadly, no longer have Benny to help me 😢
@flemmingchristiansen2462
@flemmingchristiansen2462 3 роки тому
@@RalphBacon Not having Benny brilliant coding around is a great lose to us all ☹ but you do seem to be fairly good yourself 😉, maybe it's time for a new helper.
@RalphBacon
@RalphBacon 3 роки тому
No new helper yet, Flemming. But as the great, and late, Sean Connery said (in the guise of James Bond) Never Say Never.
@GnuReligion
@GnuReligion 3 роки тому
Ah, I struggled with SPIFFS last year. Good for storing web pages, as the ESP is often used as a household mini-web server. Looking at the the LITTLEFS tool names, it appears it is a FAT16, but could be wrong. In the Linux world, one would might mount the contiguous "drive" file as as a "loopback device", and write directly to it like a drive.
@RalphBacon
@RalphBacon 3 роки тому
You lost me at "In the Linux world", Steven, but if it works for you, so be it!
@GnuReligion
@GnuReligion 3 роки тому
@Heath Parmley Keep talking to me, and will eventually get you up-and-running. It has been over a year since I messed with this. Not so much an Arduino tool option, but a directory to keep files, that gets compiled into a single contiguous filesystem-as-a-file, when uploading. Try the FSBrowser example project ... make a "data" directory where your FSBrowser.ino is stored. Do you follow? ~/.arduino15/packages/esp8266/tools/mkspiffs/0.2.0/mkspiffs {-c |-u |-l|-i} [-d ] [-a] [-b ] [-p ] [-s ] [--] [--version] [-h]
@MikesTropicalTech
@MikesTropicalTech 3 роки тому
If I create a .bin for later OTA update, does it include the files destined for storage in SPIFFS/LittleFS? If not, how can we update these files via OTA?
@RalphBacon
@RalphBacon 3 роки тому
That the subject of a future video so keep tuned.
@alexrossouw7702
@alexrossouw7702 2 роки тому
Is it better to have many smaller files, or, a fewer larger files that I navigate within? For instance: Should I have a separate file for each of my set temp, humidity, and co2 vals... OR 1 single file with all those parameters in separate lines or some other delimiters that I can use Stream methods to find?
@RalphBacon
@RalphBacon 2 роки тому
KISS, Alex. In case you (or anyone else reading this) is wondering, that stands for Keep It Simple, Stupid! It was initially introduced by the US Navy in the 1960s on the premise that systems worked better if the design was simple and not complex. Thus, in your case, I would use separate files for each of your functions. That then subscribes to the Single Responsibility Principle too, where each function has one, and ONLY one responsibility, whether that is setting your temperature or retrieving the James Webb telescope outside temperature! That way, if you need to amend that function you can be sure you won't be upsetting other functions that you didn't realise were also affected by the change. But also bear in mind Albert Einstein's advice: Make it as simple as possible, but no simpler!
@jasperkyd9368
@jasperkyd9368 2 роки тому
so i want to use the littlefs binary for my node mcu so the binary you showed in the video remains same for the esp 8266? I mean can i use the same binary for me 8266??
@RalphBacon
@RalphBacon 2 роки тому
Unlikely. Check the littleFS GitHub to see what platforms are supported (which can only be ones with Flash partitions).
@MPElectronique
@MPElectronique Рік тому
Hello, I have a question. Can we use SPIFFS and LittleFS in the same program? Thanks. Marc.
@RalphBacon
@RalphBacon Рік тому
Interesting question. I'm wonder why you would want to try! But the code simply uses the LittleFS library instead of SPIFFS so from a code point of view it might work but it would have to read the correct partition type. The first time you use a LittleFS partition you have to format it (via the code 'begin(true/false)' function) so I'm guessing that would make it inaccessible to the SPIFFS code.
@Tree2Tool
@Tree2Tool 3 роки тому
It's not obvious at the start, probably should have mentioned which version of the Arduino IDE is used for this tutorial. Earlier versions of the Arduino IDE does not have the same pull-down menu items. Most developers do not change their development environment to the latest & greatest. An earlier version of the 1.8.x actually broke. I will have to install the version used in your tutorial on a VM & do a short sanity test with my critical builds. Thank you this video.
@RalphBacon
@RalphBacon 3 роки тому
When I worked for a large software house we never updated as soon as a new version appeared. We would wait for the "point 1" increment that fixed any bugs. But in your case it sounds like you are well behind. Why not try each newer version in a VM for your critical stuff, and if all is well go for it? Sooner or later you have to upgrade, right?
@geekyfreak7920
@geekyfreak7920 Рік тому
hey Ralph, amazing tutorial, I have just one question, it's kinda overboard yet hear me out, let's say i have used SPIFFS or LITTLEFS, and wrote the whole code and now its time for production, uploading the data files for development is piece of cake. How exactly can i do it without using arduino IDE or this tool? i am assuming that we write directly to the flash memory, but again how exactly does that work?
@RalphBacon
@RalphBacon Рік тому
For production there are several ways: 1. The company building (assembling) your boards will upload for you as part of the price 2. For very large orders, the chip factory will preload the code into the chips (eg Microchip will do this) 3. For small runs you have to build a harness to upload the code to each board, that doesn't involve using something like the IDE. A bespoke upload (could use command line AVRDUDE I suppose) device. An anecdote (if you have the time to read): an electronics engineer friend of mine designed a PCB to emit various elevator announcements ("Second floor, haberdashery") for a customer. The chips got ordered, PCBs made and assembled in China and 10,000 "prototypes" sent to the UK. The announcements were just noise, not speech at all. WTH? Turns out the chip factory had supplied the chips without the uploaded and licenced .mp3 codec and the Chinese company followed the instructions that at a certain stage of production pressing button A would cause sound to be emitted ("Second floor..."). A sound WAS emitted (but not the correct one) but the Chinese accepted it as "noise". The chip company's liability was to re-supply the correct microprocessor but the assembled boards (with the wrong chip) had to be desoldered BY HAND and the replacement chip soldered back in. You could not make this up.
@geekyfreak7920
@geekyfreak7920 Рік тому
Hey Ralph, thanks for the quick reply, After dropping this comment, I started looking around and found the Spiffs bin file, which basically contains the files and it's raw data, with its memory address offset, tried coding it, and it works great, And yes for mass production, companies do flash your chip, I work in such electronics company in india, and most of my companies clients they provide BIN or HEX files to be burnt, but again, this spiffs or littlefs tool is only useful for development, I guess there shall be an opinion to export the bin file of spiffs directly as well. Thanks a lot ralph, your comment helped me solve my concept. Really appreciate your time and effort to reply. Have a great day ahead ❤️
@djpearlmiles4680
@djpearlmiles4680 Рік тому
Hi Ralph, what about given the manufacturing company a bin file which contains an OTA program to be flashed on the the chip. So when the client receives the produced order, they can remotely flash their working program to all chips remotely . This can help protect them not given their program to a third party for unauthorized use. What do you think sir?
@geekyfreak7920
@geekyfreak7920 Рік тому
@@djpearlmiles4680 I saw a video of @mission_critical, it has covered all these things, do check it out
@djpearlmiles4680
@djpearlmiles4680 Рік тому
@@geekyfreak7920 thanks for the information. I've searched for "mission_critical" and couldn't find the channel. Please kindly avail me the right link to the particular video. Thanks in anticipation.
@guenterfriedrich2871
@guenterfriedrich2871 Рік тому
Hello Ralph, thanks for your great tutorial. I have the following problem: I have IDE 1.8.15 - you work with 1.8.13 But I didn't have the the following menu options under tools menu: Flash Mode Flash size Partition Scheme Also, if I write some data with ESP32 Sketch Data Upload, I will get the error "SPIFF Mount failt:10025" - that the board cannot open flash after a reboot. What to do, to get this menu options and do you have a solution for the Error 10025? Thanks Guenter
@RalphBacon
@RalphBacon Рік тому
Do yourself a huge favour, Guenter, and download the new Arduino IDE 2.0.x which is a huge step upwards but still acts pretty much like the old 1.8.x IDE. Then you get all the options too.
@dave-in-nj9393
@dave-in-nj9393 3 роки тому
Love this, please follow up with how to pull the file from the device. I would like to have the ESP32 for my garden and once a day (week?) send the data file to my PC or RPi, or to my e-mail, or allow me to use my cell phone and download the data file.
@RalphBacon
@RalphBacon 3 роки тому
Good question, I shall let everyone know how to do this, Dave. It's always a good idea to download any files being updated on the ESP32/8266 just for backup!
@andrewtarr4474
@andrewtarr4474 3 роки тому
@@RalphBacon Hi Ralph I`m with Dave -in-NJ please do a follow up on best ways to download the file(s) from the ESP32 either via wifi or Bluetooth, many thanks I really enjoyed the video
@RalphBacon
@RalphBacon 3 роки тому
All in the plan. The only thing that worries me is that the best way to make God laugh is to tell him your plans. Hmm.
@ElieWar
@ElieWar 3 роки тому
Thanks
@RalphBacon
@RalphBacon 3 роки тому
Welcome!
@szanolli
@szanolli 3 роки тому
Hi Ralph thank you for a great video! I only had a minor glitch with the tools: The Arduino IDE couldn´t find "mklittlefs.exe" and the solution I discovered is to place it into this folder C:\Users\myuserfolder\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\tools Hope this workaround helps someone with the same error. Thanks again for such cool videos!
@RalphBacon
@RalphBacon 3 роки тому
Someone else mentioned something like this but the "tools" folder should be in the same folder as your sketches - and the compiler should find it too. The way you have it, if you upgrade the ESP32 version (eg to 1.0.5) it will be missing. But in the meantime, at least it's working!
@szanolli
@szanolli 3 роки тому
Thanks Ralph! I agree with you that it's always best to stay within the standard file structure. I shall keep this in mind for the next update... BTW I like the LITTLEFS very much! Looking forward to trying the FAT as well
@daveholden3935
@daveholden3935 3 роки тому
Hi Ralph, Having completely reinstalled Arduino (1.8.13) on Win10 64bit OS I'm now a member of the "littlefs not found" club. It does appear in the drop down and the other workrounds and solutions mentioned below and elsewhere don't work for me. At one point I considered it might be Windows Defender or, in my case, Kaspersky, stopping the apps running as clicking on the individual apps showed a Windows Defender warning. All files are in the correct folders and are the same release as those used in the video. I'm off now to try on another PC ....
@RalphBacon
@RalphBacon 3 роки тому
In my setup I placed the "mklittlefs.exe" executable in this folder: C: drive > Arduino Sketches > tools > ESP32FS > tool > HERE Try that. If no luck, put it in: C:\Users\YourName\AppData\Local\Arduino15\packages\esp32\tools\mkspiffs\0.2.3\ HERE
@franciscoborges9426
@franciscoborges9426 3 роки тому
@@RalphBacon Have the same problem, neither solution works for me
@prathambumb5593
@prathambumb5593 3 роки тому
Can you explain how to use spiffs for saving user configaration on esp8266 ? Thanks 👍
@RalphBacon
@RalphBacon 3 роки тому
Yes, sure. If you think how you would save the user configuration on an SD card, then replace SD with SPIFFS and you've got it. Creating files, reading files, appending to them... everything you can do with the SD card you can do with the SPIFFS, once you have created the partition. I'll talk about this more in future videos.
@prathambumb5593
@prathambumb5593 3 роки тому
@@RalphBacon thanks you
@neilbarnett3046
@neilbarnett3046 3 роки тому
@@prathambumb5593 If it's only user configuration you need to store, maybe startup parameters? It may be better to use preferences.h I use it for time zone, display colours, network ssid and password on a Wifi clock I'm building at the moment. Or learn SPIFFS and LittleFS, that may be more educational!
@prathambumb5593
@prathambumb5593 3 роки тому
Ok I have made the pc user configaration software using vb which send configuration data over serial to the esp vai usb Then I read the variable and separate it out problem not able to save it into spiffs
@JanHKila
@JanHKila 3 роки тому
Ralph, Just installed LittleFS-esp32 with library installer in Arduino IDE. After that the library is there, but when compiling it says: ~/Arduino/libraries/LittleFS_esp32/src/LITTELEFS.h: "fatal error: FS.h: No such file or directory". Where can I get it, or do I need some other version of the lib?
@RalphBacon
@RalphBacon 3 роки тому
Check the capitalization of the library: LittleFS or LITTLEFS, mine changed depending on the target. You've installed it in your "libraries" folder which resides in your sketches folder?
@JanHKila
@JanHKila 3 роки тому
Sorry, my bad. Need to check the correct board!
@G7Dropes
@G7Dropes 3 місяці тому
Excellent explanation, thank you very much 😄 I tried to find examples and it never worked, until now. The Arduino recognizes "Data Upload" in version 1.8.19, not in 2.0 who knows why?!
@RalphBacon
@RalphBacon 2 місяці тому
Glad it helped! To upload the data partition in 2.x follow the instructions in Post 7 here: bit.ly/42ixE8U
@G7Dropes
@G7Dropes 2 місяці тому
In fact, the possibilities are not very practical, I think I will continue to use two Arduino IDEs installed for the ESP32. After changing the theme via download, it became more useful. I also try to understand other IDEs, like Espressif, ESP-IDF and PatformIO, but no luck compiling... I'm still learning.
@someoneonly
@someoneonly 2 роки тому
Oddly enough the esp32 core documentation doesnt seem to mention littlefs at all while the esp8266 says that spiffs will be depreciated
@RalphBacon
@RalphBacon 2 роки тому
The ESP32 documentation says somewhere that LITTLEFS is now the preferred method but as you know documentation is the last thing to be brought up to date and the first thing to get out of date! One of the problems is that Espressif uses their esp-idf for development as well as supporting the Arduino port. Things never line-up between the two!
@qzorn4440
@qzorn4440 2 роки тому
all i want to do is calibrate an analog voltage sensor on 3 different samples A B C: Code-A-zero = 055 Code-A-span = 500, Code-B-zero = 045 Code-B-span = 614, Code-C-zero = 102 Code-C-span = 476... Then cycle power on the esp32 with the saved calibration numbers maintained. also these numbers will be updated for new samples. thanks any ideas? 🤔 great video.😊
@RalphBacon
@RalphBacon 2 роки тому
I'll assume you're using 10-bit analog input resolution (0 - 1023). Look at the "map" keyword to see how you can translate one set of values into a different range. To save the values across power cycles just write the calibration values to a LITTLEFS file (very much like an SD card) and read them on start up.
@qzorn4440
@qzorn4440 2 роки тому
@@RalphBacon thank you very much this is a big help and happy new year.🙂
@stupossibleify
@stupossibleify 3 роки тому
Hi Ralph. Is there any way of using this as non-volatile memory to upload WiFi settings (perhaps using WiFi direct) to a Python script that provides an IoT function? I'm finding it tedious to recompile and upload entire scripts for friends who want their own version of the temp/hum Adafruit IO python script running on a ESP32, just to effect a change to their WiFi
@PRCptPlanet
@PRCptPlanet 3 роки тому
Yes you can, there are a few wifimanager arduino libraries that will let you do this. You can also setup the ESP32 as an AP connect your phone and configure wifi that way.
@RalphBacon
@RalphBacon 3 роки тому
I'm looking to do a video about OTA updating include the (secret) text files contains SSID, passwords etc. No reason it cannot be done. In this example, although uploaded via USB, you can still have all the WiFi stuff in a file in the SPIFFS/LITTLEFS partition, tailored to suit. I hinted at it by talking about the WiFiSecrets.txt file but didn't have enough time to demo it.
@patazertyui
@patazertyui 3 роки тому
@@PRCptPlanet yes, that's the way I do it, it works well. The ESP32 first try to connect to the current wifi settings. If it fails it switch to wifi AP mode so one can connect to modify the settings using a web form. Very handy.
@Tibrus74
@Tibrus74 Рік тому
Hi. thx for the vidéo One question, my program to read a file in littlefs mode works on Arduino IDE I copy / paste the same code in Platformio and I have an error : Failed to open file for reading Any idea why it doesn't word ?
@RalphBacon
@RalphBacon Рік тому
Are you sure the file actually exists in the data partition when you run it from PlatformIO? The open failure should give you a response code or, failing that, do a "SD.exists(xxx)" first to ensure it is there. Best I can think of!
@Tibrus74
@Tibrus74 Рік тому
@@RalphBacon Of course the file exists :D On the arduino IDE I upload my program, and it's ok I swith on platformio, I upload the same program and I receive this error. That's strange
@RalphBacon
@RalphBacon Рік тому
So what's the error code you get from the open?
@Tibrus74
@Tibrus74 Рік тому
@@RalphBacon File file = LittleFS.open("/w3.css", "r"); if(!file){ Serial.println("Failed to open file for reading"); return; } I have this code. And I receive error inside the serial.println. But the same code with Arduino IDE works so the file is présent in the file system But it doesn't matter. I add in my web page some part off the CSS. I just wanted to store the full w3.css in the file system
@RalphBacon
@RalphBacon Рік тому
What happens if you ignore the error? Can you actually read the file or does that fail too?
@Ed19601
@Ed19601 3 роки тому
Hi Ralph, have been using spiffs for some time so i had the tools folder with the esp8266 and esp32 spiffs upload utilities. ESP32 Sketch Data Upload ESP8266 Sketch Data Upload Followed yr instructions but when i go to the partition scheme......no littleFS. I did install little FS for 8266 and that actually gave me a separate entry in my tools menu, next to the sketch data upload utilities, that says: ESP8266 LittleFS Data Upload. I wonder why its different for esp8266 and esp32. Anyway i ll try a few things and see where it leads me.
@RalphBacon
@RalphBacon 3 роки тому
That's possibly because you're not using the _universal_ version that the developer lorol has now put together, combining the three types of FS into the one entry (you then get a pop up window asking you to choose which one). You might have to uninstall (remove) the existing ones you have and try again. I got it wrong a couple of times too!
@Ed19601
@Ed19601 3 роки тому
@@RalphBacon i will check but i followed yr instructions to a T plus the description of the zip file mentioned spiffs, fat and littlefs. Anyway i will try further. Tnx
@RalphBacon
@RalphBacon 3 роки тому
Don't forget to (re-)move all traces of the existing installation as otherwise it will track them down.
@Ed19601
@Ed19601 3 роки тому
@@RalphBacon that would only be the esp32fs.jar, yes, removed the old one. It would have been overwritten anyway The mklittlefs.exe and mkfatfs.exe were new to my system
@pfeerick
@pfeerick 3 роки тому
@@Ed19601 Make sure you're using the LittleFS plugin from github.com/earlephilhower/arduino-esp8266littlefs-plugin/releases for the ESP8266, as the me-no-dev one is for SPIFFS, so will only end in tears ;) Because it's specifically for LittleFS, it also won't ask which FS to use. For the ESP32, lorol's plugin should give you the four options Ralph showed in the video.
@peut
@peut 3 роки тому
Probably I have a damaged/convoluted Arduino environment, but I could only make fatfs work by placing the mkfatfs and mklittlefs.exe executables in .C:\Users\myusernamewhichisnoneofyourbusiness\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\tools\ The ESP32FS tool seems to only look there for these executables, as far as I understand the Java source code. LittleFS worked initially, but that was because it found and used the mklittlefs.exe for the ESP8266, which is not necessarily similar. Installing the ESP32FS tool could be done in the tools subdirectory of the Arduino Sketch folder. (fun fact, if you create the folder as esp32fs ( lowercase) it doesn't work, which is one of the reasons why I am not overjoyed with the combination of Windows and Java). Just yesterday evening I started looking for a way to upload an FFat file system. Thanks for your serendipitous video Ralph.
@RalphBacon
@RalphBacon 3 роки тому
I'm glad this was a timely video, Jose, but your setup sounds like it good with a good clean (complete delete) and re-setup from scratch. It should only find the tools for the processor type under tools, either in ESP32 *or* ESP8266 but not mix and match. And the "tools" directory should be in the folder containing your sketches. Make a couple of backups and re-install!
@martynaslukas4340
@martynaslukas4340 3 роки тому
Great video. Just one thing to point is that B != b. So 4MB = 32Mb. 1Byte is 8bits
@RalphBacon
@RalphBacon 3 роки тому
You're not the first to point this out, Martynas! B for bytes and b for bits. I know this so why I used lower case b when I meant B at one point in my video is beyond me. And, of course, most manufacturers advertise their products as 32Mb to make it sound more impressive than a 4MB chip!
@martynaslukas4340
@martynaslukas4340 3 роки тому
@@RalphBacon anyhow. You made me to order esp32 and i will be following you for the future ;)
@martynaslukas4340
@martynaslukas4340 3 роки тому
@@RalphBacon aslo, broadband providers are using this trick to show how fast they are :D all this 100Mb is just 12.5MB... and sometimes i can hear them saying 100mega bytes...
@renelefebvre53
@renelefebvre53 3 роки тому
I see in the include files that LittleFS come with FreeRTOS package . Can I use this Rtos in my code ?
@RalphBacon
@RalphBacon 3 роки тому
Each ESP32 already contains FreeRTOS built into the chip. It mostly runs on Core 0 which is why we should really only run stuff on Core 1 so as not to upset WiFi, BT etc. The loop() runs on Core 1 by default. I did two videos on the ESP32 Core 0/1 multitasking - take a look: ukposts.info/have/v-deo/oqCHl3mkn26kyps.html and ukposts.info/have/v-deo/saeTpWeoiWOXumQ.html
@russonjacana
@russonjacana Рік тому
I downloaded the three files into the tool folder (..tools/ESP32FS/tool). I have the txt file as described. when I try to upload, I get the message "LittleFS Error: mklittlefsnot found!". The ESP I am using is a nodeMCU-32S. This board does not bring up any option for selecting the partition. I did run LITTLEFS_test (from the libraries tree) and it worked. Is it the fact that I have a nodemcu board causing this?
@RalphBacon
@RalphBacon Рік тому
I'm going to have to update this video soon, Russ, as my understanding is that Espressif have already (or will imminently) use LittleFS as the _default_ so we should not have to muck about with all these extra workarounds. In the meantime, make sure your project folder contains the three programs I mention: mklittlefs.exe replace_fs.py folder: LittleFS_esp32 which has several files. I mainly use PlatformIO (from Visual Studio Code) so it might work slightly differently in a pure Arduino IDE environment.
@russonjacana
@russonjacana Рік тому
@@RalphBacon OK, I have come back to the LittleFS portion of my project. I have three files (mklittlefs.exe, mkfatfs.exe, esp32fs.jar) in folder /Arduino/sketches/tools/ESP32/tool. (Is there a change, in that in your reply you mention replace_fs.py? ) I have SPIFFS_Demo.txt in .../sketches/ESP32_SPIFFS_Demo1/data. When I click on ESP32 Sketch Data Upload, the window appears and I select LittleFS. I still get the message "LittleFS Error: mklittlefsnot found! ". The erase option works, as does the SPIFFS option (except when I run ESP32_SPIFFS_Demo1, it says the txt file is not loaded.), but LittleFS gives me the error. The partition scheme has 3 options, Default, no OTA (Large APP), and Minimal SPIFFS (large apps with OTA). I see nothing in preferences that pertains. Any idea what I am doing wrong?
@russonjacana
@russonjacana Рік тому
Further. If I select the ESP32 dev board, all the options are there, but I get the same error message.
@discman777
@discman777 Рік тому
@@russonjacana Great tutorial video, Ralph. I am also seeing the same problem as Russ: “mklittlefs not found” when running the data upload. Consequently, no data uploading message appears during the sketch loading, then fails mounting. Have you resolved the problem?
@discman777
@discman777 Рік тому
Located the path that works for me: \Users\YourName\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\tools\
@theonlymudgel
@theonlymudgel 3 роки тому
Hi Ralph, Thought I was late as just got notification but seems I’m first to comment. All the best.
@RalphBacon
@RalphBacon 3 роки тому
Thanks, you too!
@JanHKila
@JanHKila 3 роки тому
Ralph, It seems a hurdle race. Right now I've this message: "LittleFS Create Failed!" And I don't know what to do. At first I get: "Can't find mklittlefs" upon that I moved the files mkfatfs and mklittlefs to: "users/username/Libraries/Arduino15/packages/esp32/hardware/esp32/1.0.4/tools" And now this one: "LittleFS Create Failed!" Do you have any thoughts please?
@RalphBacon
@RalphBacon 3 роки тому
If it were easy we'd all be doing this. Oh. OK, let's think. 1. Have you defined the partition for your ESP32 in a suitable manner eg No OTA (2MB App/2MB SPIFFS)? 2. In the code, did you change the line in setup ( ) to LITTLEFS.begin(true) to allow the partition to be created (if it can't find the partition)? Let me know!
@JanHKila
@JanHKila 3 роки тому
@@RalphBacon There is some progress. After I did your #1, I get: === ESP32_SPIFS_demo1 ========= ================================ /Users/janhkila/Documents/Arduino/libraries/LittleFS_esp32/src/lfs.c:1003:error: Corrupted dir pair at {0x0, 0x1} E (37) esp_littlefs: mount failed, (-84) E (40) esp_littlefs: Failed to initialize LittleFS LITTLEFS Mount SUCCESSFUL. ================================ == List Directory ============ Listing directory: / ================================ Read file with path: /SPIFFS_Demo.txt ==================== File failed to open. Since loral created that file I think I better ask him. Thank you.
@RalphBacon
@RalphBacon 3 роки тому
You do need to create that file in the data directory and upload to SPIFFS/LittleFS first in order to read it.
@JanHKila
@JanHKila 3 роки тому
Ralph, I've fallen into the Arduino-SketchBook-trap. Out of the box the Arduino IDE comes with a path to the sketchbook as: "/users/username/documents/arduino". While there's no information whatsoever that THIS is the sketchbook I created my own sketchbook directory as: "appearance /users/username/documents/arduino/tools", and... all is well! This is just in case there are maybe people like me: Be warned!
@RalphBacon
@RalphBacon 3 роки тому
The "out of the box" path is indeed the usual path. I wouldn't put my sketches in the subfolder called "tools" as that is where items such as the LittleFS or SPIFFS executables reside. It might be time to reconsider your setup - as I've been saying to myself for the best part of a year, mine are a mess!
@eddyrulo749
@eddyrulo749 3 роки тому
Hey, i am working on a project and inneed to upload an html and css file and i tried with spiffs and eventualu did upload the html file but when i tried to upload the css file the web server didnt read it and also almost all the times the web server didnt load in chrome. I’ve been trying some solution ps but none of them work and now the code that did work with the html only, does not work now, and i dont know why. Could you please help me? I could send you the codes if you need because this is for my robotics school project
@RalphBacon
@RalphBacon 3 роки тому
If the .html page is working, Eddy, then it sounds like it cannot find the css (or that there is an error in the CSS syntax). If you place the .html and .css files in a windows folder and open the html file in a normal browser (double click it), does it all work?
@eddyrulo749
@eddyrulo749 3 роки тому
@@RalphBacon yeah in the web browser everything works fine but now it doesnt even work the program in the esp32 that only uploaded the html. That program worked until yesterday when i treid other programa and neither of them worked, and then the one that worked stopped working. Now i dont have any program that serves the web server that works correctly because the page doesnt load
@eddyrulo749
@eddyrulo749 3 роки тому
I made it work! it was a really stupid mistake and i didnt put server.begin(); after sending to the server the files. Even tho you didnt have the problem i had, this helped me understand better some things, thanks!
@svvelanautica2374
@svvelanautica2374 3 роки тому
I would like to join the littlefs users, but I cant get it working. Upload tool is installed, SPIFFS and erase flash is working but always get mklittelfs not found. tried to install in all possible "tools" folders but no change. my mkspiffs is loading from: C:\Users\dokto\AppData\Local\Arduino15\packages\esp32\tools but mklittlefs will also not work from there... Anybody with help?
@RalphBacon
@RalphBacon 3 роки тому
Does it appear in the drop down menu like I showed?
@svvelanautica2374
@svvelanautica2374 3 роки тому
@@RalphBacon Hello Ralph, Yes it appears in the drop down. It has 4 topics, 1. littlefs 2. Spiffs 3. Fat 4. erase flash The Spiffs and and erase are working but littlefs andfat don´t work. Always say mklittlefsnot found.... Now I try to use the backdoor, I placed my files on an SDcard and read them from there into littlefs file system. If anybody has a tip how to get the usual fileimage upload working? I will be thankfull
@RalphBacon
@RalphBacon 3 роки тому
I am confused about this. If the items appear in the menu, it indicates that the tools were found. But when you try and use them it creates an error. Try removing the LittleFS tools from the folder you have them in, and place them in a tools folder in the same folder as your sketches (as I have). See if the IDE still finds them.
@cts8332
@cts8332 Рік тому
At 6:07 kept me attending. 1.... B... 3...
@RalphBacon
@RalphBacon Рік тому
It's the alternative to the boring 1, 2, 3!
@maddy33333
@maddy33333 9 місяців тому
😂😂😂😂😂 epic
@eduardocardoso5588
@eduardocardoso5588 3 роки тому
how to do this in PlatformIO?
@RalphBacon
@RalphBacon 3 роки тому
Main document here: github.com/lorol/LITTLEFS/tree/master/examples/LITTLEFS_PlatformIO With added notes part way down the page here: github.com/lorol/LITTLEFS#platformio
@FabricOfExistence
@FabricOfExistence 3 роки тому
How many read/write operation before it dies?
@RalphBacon
@RalphBacon 3 роки тому
Lots! We're mostly _reading_ the data so it will be a cold day in Milton Keynes before it dies because of that. However, if we are writing to the file system (eg file logging) then the wear-levelling algorithm built into the chip should ensure at least 100,000 writes. So best not to log things 10 times per second.
@spwim
@spwim 3 роки тому
Could you make all more advanced features in platform io pls 😜
@RalphBacon
@RalphBacon 3 роки тому
I will certainly aim to do this in future videos.
@spwim
@spwim 3 роки тому
@@RalphBacon thanks, or just do a side jump because for example configuring the Filesystem has to be done platformio.ini , i just implemented it. It works very well, but writing a complete struct to the Filesystem does get messy haha, it doesn't save the struct completely in one memory location it seems.
@RalphBacon
@RalphBacon 3 роки тому
Hmm. The data files in the SPIFFS partition should be transparent to your code's request to read it, regardless of where each block is (just like on a hard drive in your PC). If you write 20 bytes (as part of a struct) it will do so and read it back the same, should be no messy behaviour.
@spwim
@spwim 3 роки тому
@@RalphBacon the problem is more the struct in RAM. it seems that one doesn't get stored in a consecutive array. The members of the struct sometimes follow each other, sometimes it seems they don't. I also don't initialize the variables of the struct right away, but i do that in runtime. any way, i am now trying to store every veriable of the struct seperately instead of doing one giant memcpy
@J.D-g8.1
@J.D-g8.1 11 місяців тому
😊😊😊😊
@RalphBacon
@RalphBacon 11 місяців тому
Glad you liked it. But note that LittleFS is now STANDARD in the ESP32 Arduino framework from Espressif, no funny monkey business with files required.
@newburypi
@newburypi 3 роки тому
Thanks Ralph. I have a SPIFFS project in the queue now, but I will link in the LittleFS info (yes I know ALL CAPS). Funny part is that I read SPLIFFS when I first saw your posting. Serial Peripheral Little Interface Flash File System?
@RalphBacon
@RalphBacon 3 роки тому
I'll put your suggestion for a name change forward to Espressif, Dale. I wonder what they will say? That we've both been on the wacky backy.
@taranagnew436
@taranagnew436 3 роки тому
what does %s/r/n mean in c++?
@RalphBacon
@RalphBacon 3 роки тому
That looks like part of a Serial.printf statement which means: Serial.printfs("Hello %s ", myName); Print the string "Hello " then print the variable myName where I've indicated by the %s placeholder, then print a carriage return (" ") followed by a newline (" "). Normally, we'd just use " " and not the " " as well. OK, Taran?
@dutchdykefinger
@dutchdykefinger 3 роки тому
extra info: the reason to use " " is because windows stock software doesn't quite understand unix newlines, which are just " "
@RalphBacon
@RalphBacon 3 роки тому
The only time I've used both " " and " " is when creating an http request (eg a GET). Other times, the " " works fine in the debug windows (Serial Monitor) on a Windows PC.
@JanHKila
@JanHKila 3 роки тому
Ralph, Some perseverance is always handy to solve several problems. First: I have to find a mklittlefs file for the Mac; found it here: github.com/earlephilhower/mklittlefs/releases Second: I must persuade my Mac to trust that developer. Third: I used a simple test sketch. Fourth: HOLD DOWN THE BOOT BUTTON when it says: Connecting ..... _____ ..... #include "LITTLEFS.h" void setup() { Serial.begin(115200); if(!LITTLEFS.begin(true)) { Serial.println("An Error has occurred while mounting LITTLEFS"); return; } File file = LITTLEFS.open("/Some_shit.txt"); if(!file){ Serial.println("Failed to open file for reading"); return; } Serial.println("File Content:"); while(file.available()){ Serial.write(file.read()); } file.close(); } void loop() {}
@RalphBacon
@RalphBacon 3 роки тому
I'm guessing, Jan, as you didn't exactly say, that this is now working for you? BTW on some ESP32 module you do NOT have to hold down the BOOT button. I don't do this on my WROVER boards but I do have to do it on my WROOM board - there is no technical reason why we have to do this, just poor board design!
@alexrossouw7702
@alexrossouw7702 2 роки тому
The git has completely changed the files since last year. A new video is in order. This process was painful and confusing. I did managed to seem to get it working tho on my firebeetle esp32 tho after pulling my hair out.
@RalphBacon
@RalphBacon 2 роки тому
I'm sorry you had so much trouble, Alex, (others have reported the same). For me it was plain sailing otherwise I would have tried to simplify the whole thing. However, once it's working it's great as you have now found out (I hope). 😊
@Lar_ry
@Lar_ry 2 роки тому
what did you find make it work im also having some issues and im on the last part of my program and i need to upload the html data for my webserver all the other code is done just cant get littleFS to upload my /data folder. I have been doing this stuff for over 10 years and this one has got me good.
@alexrossouw7702
@alexrossouw7702 2 роки тому
@@Lar_ry I googled some tutorials too, but this video did help me the best. Sometimes I just brute-force all possibles solutions and 1 does work eventually. Dont give up! Otherwise if all fails for too long: try a giant flash string with html/JS code in it, it's not the cleanest solution but it will work without a filesystem.
@dunk_law
@dunk_law 2 роки тому
How is this done on platformIO ?
@RalphBacon
@RalphBacon 2 роки тому
These days, I think all you need to do is: "To activate LittleFS, you simply need to add the option board_build.filesystem=littlefs to the configuration file" You might have to implement the tools but see if that helps first.
@dunk_law
@dunk_law 2 роки тому
@@RalphBacon Does not work. I have trawled the internet but no joy. PIO only has the folder "tool-mkspiffs". I have seen a few bodges that might work, but no real solutions as yet. Any ideas?
@RalphBacon
@RalphBacon 2 роки тому
Not off the top of my head. When I did the video I installed it on PlatformIO too and have used it there ever since. You do have to place the tools 'mklittlefs.exe' and 'replace_fs.py' which I have in each project folder, along with the various OTA.csv partition files. In my platformio.ini I have: lib_deps = github.com/lorol/LITTLEFS.git board_build.partitions = no_ota.csv ;depends on use of OTA! board_build.filesystem = littlefs extra_scripts = replace_fs.py More information in that GitHub mentioned a few lines up (by Lorol). Scroll down the readme page to the PlatformIO bit. Any good?
@dunk_law
@dunk_law 2 роки тому
@@RalphBacon Yes, but that was one of the bodges I was thinking of. The other was to substitute the .exe in tool-mkspiffs with mklittlefs.exe, by renaming it as a straight substitute. Thanks for the link. The one on the lorol GIT if preferable. I will do that for the time being but the deprecation was announced some time ago & I would have thought that PIO would have caught up with this by now.
@RalphBacon
@RalphBacon 2 роки тому
You would have thought so, but some things grind small but very slowly.
@surenbono6063
@surenbono6063 3 роки тому
..prefer esp8266 ...robust xp compitable ..something wrong with esp32 upload ...it needs to be reset on upload...or missing a cap between EN to gnd
@RalphBacon
@RalphBacon 3 роки тому
My ESP32 Dev Board needs nothing done to it to accept the upload via the USB port. Perhaps you have an older model and they have now fixed it?
@BerndFelsche
@BerndFelsche 3 роки тому
3 megabytes! That's like 10 floppies!
@tenlittleindians
@tenlittleindians 3 роки тому
10 floppies? That's more than enough room to hold Windows 3.1
@ChiDraconis
@ChiDraconis 3 роки тому
@@tenlittleindians Naw we need 10 Gazillion just to process on ascii char
@RalphBacon
@RalphBacon 3 роки тому
If you were to get an ESP32 with 64Mb flash on it (available but not mainstream just yet) you could probably run NASA on it. There is also the 8Mb of PSRAM (treated as 2 x 4Mb banks) on the WROVER versions; another video for that, perhaps!?!
@hclchgm
@hclchgm 10 місяців тому
I know this is asking an awful lot but why can't you do this and android?
@RalphBacon
@RalphBacon 10 місяців тому
I'm not sure what your question means. Android running where?
@basiljackson3829
@basiljackson3829 9 місяців тому
@@RalphBacon Perhaps the question about why this can't be done on an Android refers to ArduinoDroid, an Arduino IDE for Android devices. If so, the answer would be obvious: because loro only provided for Windows, Linux and Mac so only loro could answer as to why the tool isn't available "for Android".
@abpccpba
@abpccpba 3 роки тому
Eureka.
@RalphBacon
@RalphBacon 3 роки тому
Is your Arduino bath water overflowing, Paul? Sounds like you liked this one!
@fredflintstone1
@fredflintstone1 3 роки тому
Oh! My head, I woke with a head ache and it got worse, not your fault of course, but mine, any chance you could do an instrutional video of using tasmota/tasmotizer, that really should give me a headache :-)
@RalphBacon
@RalphBacon 3 роки тому
Tasmota gave me a headache too, although I got it working on my Sonoff switch (ESP8266); but at the time it was a sledgehammer to crack a nut. I shall have to think about a complete Tasmota / Node-Red / Mosquitto / MQTT project for my workshop.
@fredflintstone1
@fredflintstone1 3 роки тому
@@RalphBacon that would be great as I want to use it to program my Sonoff Plugs and basic units, the ram seems easy to increase on those as it is just one chip to remove and adda bigger capacity I think but programming gives me the head ache:-)
@imperiosheriff
@imperiosheriff 3 роки тому
LittleFS Error: mklittlefs not found!
@RalphBacon
@RalphBacon 3 роки тому
Try putting the mklittelfs.exe into the "tools" directory either in your sketches folder or in C:\Users\[yourname]\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\tools which others have found to work.
@imperiosheriff
@imperiosheriff 3 роки тому
@@RalphBacon Ok LITTLEFS Mount SUCCESSFUL. but in my case only has worked putting it in this directory: C:\Users\[myname]\Documents\Arduino\hardware\espressif\esp32\tools. sorry for my bad english. thankyou
@PyroRob69
@PyroRob69 3 роки тому
Without waiting for the video to finish, it's too bad those tools are Windows exe's. Not all of the world uses Windows.
@RalphBacon
@RalphBacon 3 роки тому
There are tools for Mac and Linux, no worries.
@pfeerick
@pfeerick 3 роки тому
Arduino IDE works on both Linux and Mac also, and the plugins that add the ESP8266 & ESP32 upload entries to the Arduino IDE run anywhere it does. The ESP8266 and ESP32 board support packages are cross-platform also - so there is no reason to use Windows to follow along at home! ;)
@PyroRob69
@PyroRob69 3 роки тому
Yep, I knew the IDE worked on Linux, I just didn't see anything other than EXE's.
@NikosMouratidis
@NikosMouratidis 3 роки тому
Why? This is my question after watching this video... Really... Why??? The only reason explained in this video to prefer LittleFS over SPIFFS is directories and resiliency in power failures which was never an issue on SPIFFS anyway. Also a vague argument that Espressif mentioned that SPIFFS will not be supported in the future (a source would be useful). I think he probably means that the open-source community that develops Arduino core for ESP8266 stopped support for SPIFFS. They are NOT Espressif, which officially supports SPIFFS on ESP-IDF for both ESP8266 and ESP32. The ESP32 Arduino core open-source community IS indeed guided by Espressif and it has not deprecated SPIFFS or added support for LittleFS. But if it was just the lack of explanation of why LittleFS is useful, I wouldn't spend the time to write this. The main reason I'm writing this is the amount of misinformation contained! 1. At 2:25 referring to a generic 2.5" SATA SSD: "this is a laptop disk". Really? How are desktop SSDs? In fact, laptops only used these 2.5" SATA SSD for a short period of time many years ago. 2. At 3:32, he implies that you need to have a huge program to go over 500K of his "huge" Home Alone project. Well, just include "BluetoothSerial.h" in an empty sketch and make a simple call to it, and you get 850kb of compiled program with just 2 lines of code. Also include "Wifi.h" and a call to that library. Now you have 4 lines of code and you are looking at 1.3Mb compiled size. I guess I'm crazy using Bluetooth and Wifi on ESP32, a SoC you buy specifically for these 2 features. 3. At 6:16 video says LittleFS is faster. I copy from official LittleFS github page "SPIFFS will likely outperform littlefs on small memories such as the internal flash on microcontrollers". These are the words of the developers of LittleFS themselves. But this guy knows better. 4. At 6:30 narrator starts to explain 3 reasons why LittleFS was developed. Number 3 is an "unfortunate disadvantage". So, apparently one of the reasons LittleFS was developed was to have disadvantages. 4. At 6:45 narrator confuses RAM of ESP8266 with its flash memory amount. 5. At 8:17 you can clearly see that the creator of LittleFS library for ESP32 is a 3rd-party programmer called "lorol". Then on 8:44 and 8:56 video says that the Espressif (?????) documentation for a 3rd part library is wrong! So the video implies LittleFS library is made by Espressif and apparently the documentation is bad. A link to that Espressif documentation of 3rd party library would be useful! I think this guy is reading documentation of ESP8266 Arduino Core and applies it in 3rd party library for ESP32! WTF? 6. At 9:32, "LittleFS is the obvious choice". Well, I guess we'll just have to take his word for that. 7. At 11:33 the sketch folder where you need to create the "tools" subfolder, is not "where you like to save your sketches" as the video says. You can save your sketches anywhere, but you need to create the tools subfolder under the official sketches folder that the Arduino IDE recognizes, and you can find that in the Arduino IDE preferences dialog. Nice step-by-step guide. 8. At 15:20 he wonders why would anyone like to run their ESP32 not at full speed because obviously he never made a battery based project. He easily advises everyone to use full speed. 9. At 15:47 the whole point he makes about Arduino reading the chip is a totally made up assumption which is NOT true. redundancy 11: At 17:30 there is so much misinformation about what OTA is, I don't know where to start. Sketch is uploaded??? Sketch is uploaded temporarily in a partition and then moved to "program memory"??? What even is "program memory"? Has this guy ever done OTA? 12. At 18:25, that FatFS that this guy "haven't even investigated" is the thing that he should investigate and spare us from watching this video. FAT is a filesystem that has directories and wear leveling, is officially supported by Espressif, does not need any 3rd party libraries like LittleFS does. It works right out of the box without installing any extra libraries. And it's not "deprecated" (as apparently SPIFFS is) because its used in computers (it's the one most USB flash drives and SD cards are formatted with for compatibility with both Windows AND Mac). How cool to have the same computer FS on your ESP32? It's also faster than LittleFS, as you can see here: github.com/espressif/arduino-esp32/issues/3765 Well... this guy didn't investigate but gives good advice about what FS to use on your ESP32.
@flipschwipp6572
@flipschwipp6572 3 роки тому
thought the same
@pfeerick
@pfeerick 3 роки тому
You forgot to preface that with with /rant follows... :-O 1 is just nitpicking... every single laptop I have in my house (and the vast majority of those in use worldwide) uses the 2.5" SATA hard drive format... just because you have laptops using NVMe doesn't make that point being conveyed invalid... Generally, yes, there was some information. For example, "SPIFFS is dead" is not relevant to the ESP32 - but only to the ESP8266 community maintained Arduino BSP. The official Espressif ESP32 Arduino BSP doesn't even support LittleFS natively yet - it is slated for inclusion in V2 of the BSP. Even then, I doubt there will be any hurry to depreciate SPIFFS. And OTA... well, that was partly right... just not the bit about it being re-written... as we both know it goes into the inactive app slot and if on reboot the bootloader checksum verification passes it boots the newly programmed slot, otherwise it sticks with the old app slot. I'm sure Ralph will figure that out when he delves into the ins and outs of OTA. I think the takeway message *should* have been - if you're on the ESP8266, it is advisable to use LittleFS for new code, and consider whether there is a need/benefit to migrating old code, especially if they drop support for SPIFFS in v3 of the BSP. Otherwise, you'll need to ensure you keep a copy of the old toolchain (which isn't a problem if you use PlatformIO) to make changes to code / filesystems. And for the ESP32, it's worth exploring, but isn't natively available yet, but isn't hard to add. And it does have it's benefits over SPIFFS, just as SPIFFS outperforms LittleFS for specific tasks. So explore it, and see which is best for a given project.
@RalphBacon
@RalphBacon 3 роки тому
Thanks for the feedback.
@jonasnicolaysen8019
@jonasnicolaysen8019 3 роки тому
@@pfeerick I made a program for wemos d1 mini esp8266 using vscode with platformIO today. when i used SPIFFS i got messages that its deprecated and it recommend using littleFS instead.
@pfeerick
@pfeerick 3 роки тому
@@jonasnicolaysen8019 That message is coming from the Arduino ESP8266 board support package - if you check the github for it you'll be able to see the commit it was added, and the discussion and confusion around it. It does not mean it will not work, only that it will only see bug fixes from now on, and will be dropped in a future major version release (it cannot be dropped now as that would be a breaking API change). The beauty of PIO though is you can lock your project to a version that has SPIFFS support if SPIFFS is dropped in the future.
@007hansen
@007hansen 3 роки тому
I downvoted because the video failed to explain to me what the contents of the video are, even your github fun doesn't help. Your british accent doesn't cover for the incoherent boomer rambling.
@RalphBacon
@RalphBacon 3 роки тому
Did you at least get a clue from the title?
@mikea683
@mikea683 3 роки тому
I downvoted your comment because I understood the video, I don't agree with you, and I couldn't find a video on your channel that does a better job than this video.
@007hansen
@007hansen 3 роки тому
@@mikea683 shit, thank you for reminding why people just downvote and don't explain themselves! What I'm saying is, I'm missing an introduction which explains why I should care about the next 20 mins... Could you also explain to me, which video in particular you mean? They are 10 years old and I didn't even bother correcting my teenage english.
@mikea683
@mikea683 3 роки тому
@@007hansen I think I explained myself quite clearly. Perhaps the issue isn't the information being presented, but rather your ability to process it? Let me explain my reasoning a little better... There are 3 options when viewing a video. You can either Like it, Dislike it, or do neither. If you don't necessarily like something, you can leave constructive criticism without jumping straight to the dislike button. Throwing in a lame ass "boomer" insult for good measure is also a little ripe given that the man is clearly putting a lot of effort into making these videos. My point around your channel is that you haven't done any better so you are hardly best placed to throw negativity and criticism around. I hope this helps.
@007hansen
@007hansen 3 роки тому
@@mikea683 because he put that much effort in it, I care about him improving. Sure, you have to be better than somebody to give them critisim... keep the ad hominem attacks comming! I hope you feel strong when you type and post them, because you don't seem so to me when I read them.
@zyghom
@zyghom 2 роки тому
8:50 it is not only case sensitive but these are 2 different libraries for 2 different implementations: "LittleFS" and "LITTLEFS" - so big difference between LittleFS.h and LITTLEFS.h
@RalphBacon
@RalphBacon 2 роки тому
Hmm. I wonder if this has been causing confusion since I made the video. I'll check to see what's what and clarify in a future video. Thanks for the heads up, Zygfryd.
@zyghom
@zyghom 2 роки тому
@@RalphBacon LITTLEFS is now external library. LittleFS is part of the core of Arduino. I am right now working on config.json for my sensors ;-)
@RalphBacon
@RalphBacon 2 роки тому
I will try out the in-built version of LittleFS at the next available opportunity!
#202 Using Assembler 😵 within an Arduino Sketch - easy to do! 😊
27:30
ESP32 Guide 2024 | Choosing and Using an ESP32 Board
41:06
DroneBot Workshop
Переглядів 196 тис.
Лизка заплакала смотря видео котиков🙀😭
00:33
#121 SPIFFS and JSON to save configurations on an ESP8266
11:30
Andreas Spiess
Переглядів 111 тис.
No more SPIFFS! LittleFS vs FatFs
3:38
That Project
Переглядів 15 тис.
#232 How to secure our devices using SSL (ESP8266, ESP32, Tutorial)
17:27
Andreas Spiess
Переглядів 113 тис.
ESP32: How to create a config file with SPIFFS or LittleFS
12:46
MoThunderz
Переглядів 10 тис.
The Cheapest Microcontroller? Getting started with the 10 cent Puya PY32.
21:36
Zach of All Trades
Переглядів 21 тис.
#224 🛑 STOP using Serial.print in your Arduino code! THIS is better.
26:39
PlatformIO: All you need to know in 10 Minutes!
10:56
J's e-shack
Переглядів 277 тис.
Infrared Soldering Iron from Cigarette Lighter
0:58
ALABAYCHIC
Переглядів 1,7 млн
The PA042 SAMSUNG S24 Ultra phone cage turns your phone into a pro camera!
0:24
ИГРОВОЙ ПК c WILDBERRIES за 40 тысяч рублей
30:17
Ремонтяш
Переглядів 483 тис.