🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Preferences library on M5Core

    Arduino
    2
    2
    3.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      danielha
      last edited by

      Hi all !

      I'm planning to use the Preferences library to store some information in my M5Core. At some point i will need to change the values I'm storing there and one of these values is a large chunk of an html page (over 20 kB). Changes won't be needed that often so I don't think I'll harm the flash memory. However, what's my best strategy for updating ? Just save the new key value ? Set the key to a Null String then save the new page ? Remove the key then recreate it ? Does it make any difference in the way the flash memory is managed ?

      Thanks for your help,
      Daniel

      1 Reply Last reply Reply Quote 0
      • A
        AgreeDK
        last edited by

        as I recall there is a size limit when using Preference lib, so suggest you only use that for things like ssid and passwords. You can save your web pages in SPIFFS memory, try look here: https://randomnerdtutorials.com/esp32-vs-code-platformio-spiffs/

        1 Reply Last reply Reply Quote 0
        • First post
          Last post