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

Поделиться
HTML-код
  • Опубликовано: 11 фев 2025

Комментарии • 29

  • @faustozecca4187
    @faustozecca4187 14 дней назад

    Thanks so much for taking the time for our collective benefit!

  • @johnheitz7517
    @johnheitz7517 Год назад +3

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

  • @marshall100w6
    @marshall100w6 Год назад

    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 11 месяцев назад +1

      typical is 10,000

    • @B..bsSeeker
      @B..bsSeeker 11 месяцев назад

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

    • @mothunderz
      @mothunderz  10 месяцев назад

      Yes, LittleFS is the better implementation

  •  10 месяцев назад

    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?

    •  10 месяцев назад +1

      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.

  • @suprihandoyo3900
    @suprihandoyo3900 3 месяца назад

    thank u
    u teach me

  • @mdzubaer8934
    @mdzubaer8934 3 месяца назад

    can you mack ew video - esp8266 with mcp23017

  • @jak_k
    @jak_k Год назад +1

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

    • @mothunderz
      @mothunderz  Год назад +5

      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.

  • @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 :-)

  • @sahanpanditharathne2765
    @sahanpanditharathne2765 5 месяцев назад

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

    • @mothunderz
      @mothunderz  4 месяца назад +1

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

  • @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:
      ruclips.net/video/DEFPSfLRObk/видео.html
      Good luck with your project!

    • @ShawankumarParida
      @ShawankumarParida Год назад

      @@mothunderz thank you!

  • @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 😀 🙏

  • @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!