ESP32: How to create a config file with SPIFFS or LittleFS

Поділитися
Вставка
  • Опубліковано 23 лис 2024

КОМЕНТАРІ • 28

  • @johnheitz7517
    @johnheitz7517 Рік тому +2

    I love your video's ... Please keep them coming

  • @marshall100w6
    @marshall100w6 9 місяців тому

    Thank you for your video😉. I have a question, How many times could you write to the flash memory¿ I've read there is a limited write times. Thank you again.

    • @NathansHVAC
      @NathansHVAC 8 місяців тому +1

      typical is 10,000

    • @B..bsSeeker
      @B..bsSeeker 8 місяців тому

      ​@@NathansHVAC LittleFS should be better. It uses wear leveling in some form.

    • @mothunderz
      @mothunderz  7 місяців тому

      Yes, LittleFS is the better implementation

  • @mdzubaer8934
    @mdzubaer8934 19 днів тому

    can you mack ew video - esp8266 with mcp23017

  • @suprihandoyo3900
    @suprihandoyo3900 Місяць тому

    thank u
    u teach me

  • @sahanpanditharathne2765
    @sahanpanditharathne2765 3 місяці тому

    can you do a video on how to save data on an external SPI chip like W25QXX

    • @mothunderz
      @mothunderz  Місяць тому +1

      My apologies, but I am swamped with work and cannot make any videos at the moment

  • @ArthurHooyschuur
    @ArthurHooyschuur Рік тому

    Thank you for the video’s 🙏

    • @mothunderz
      @mothunderz  Рік тому

      You are very welcome! Please note that I added an example now on Github as well for LittleFS. If you are using an ESP32 library of V2.0.4 or newer then Espressif recommends to use LittleFS instead of SPIFFS. Works exactly the same though :-)

  • @jak_k
    @jak_k Рік тому

    Doesn't Espressif recommend using LitleFS now instead of SPIFFS? Thank you for another clear video.

    • @mothunderz
      @mothunderz  Рік тому +4

      Thank you for bringing this to my attention. For this small config file example there wont be a real difference, but yes: it is better to use LittleFS if your ESP32 library is v2.0.4 or newer. However, luckily the LIttleFS and SPIFFS libraries work exactly the same. I have added a LittleFS example on Github and have updated the video description. Hope it is clear like this.

  •  8 місяців тому

    Is this memory safe method? If you get bigger string and write it to the "named.json" next to second file "second.json" will it overwrite the content?

    •  8 місяців тому

      SPIFFS garbage collector looks for free space. If there is none it crashes :P If you delete file somtime it leave trash, and garbage collector gets confused. Anyway, if you add formatting case, it will format whole space and repair itself.

  • @grahamheath3799
    @grahamheath3799 Рік тому

    There is a bug in the littlefs version spiffs seems okay. I guess you never ran the littlefs version.
    while(file.available()){
    String fileText = file.readString();
    }
    file.close();
    return fileText;
    I am told that that the line
    String fileText = file.readString(); declares another variable that only exists within the while loop.
    so value is never passed back to readconfig
    Thank you for speeding up my learning curve!

    • @mothunderz
      @mothunderz  Рік тому

      Thanks for pointing that out. No idea how that got in there. Think my compiler did not object as fileText was also defined above the while loop. So thank you for pointing this out, I corrected it on GitHub. Cheers!

    • @grahamheath3799
      @grahamheath3799 Рік тому

      @@mothunderz Really should have said earlier I am enjoying working through so me of your videos. Please don't give up the hard work.

    • @mothunderz
      @mothunderz  Рік тому

      Thank you very much for your encouraging words 😀 🙏

  • @ShawankumarParida
    @ShawankumarParida Рік тому

    Can we set up a web server and store the data in the sd card connected to esp32 ?

    • @mothunderz
      @mothunderz  Рік тому +1

      Yes, that should be possible, just combine this code with that of the web server:
      ua-cam.com/video/DEFPSfLRObk/v-deo.html
      Good luck with your project!

    • @ShawankumarParida
      @ShawankumarParida Рік тому

      @@mothunderz thank you!

  • @marcosgiovanni9682
    @marcosgiovanni9682 Рік тому

    Very good your videos, could implement the triggering of digital inputs and button triggers via websocket with a web interface

    • @mothunderz
      @mothunderz  Рік тому

      Yes, will do in my next video - stay tuned

  • @ShawankumarParida
    @ShawankumarParida Рік тому

    What about making an AI desk robot like Anki Vector!

    • @mothunderz
      @mothunderz  Рік тому

      Cool idea, I have not looked into that yet...

    • @ShawankumarParida
      @ShawankumarParida Рік тому

      @mothunderz esp32 has everything. we just need a display module a few motors it'll be done.. You should try it!