B4R Question How can I create a ".txt" file and at the same time fill it with rESP8266FileSystem (SPIFFS).

Discussion in 'B4R Questions' started by Johan Hormaza, May 24, 2018.

  1. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    How can I create a ".txt" file and at the same time fill it with rESP8266FileSystem (SPIFFS).
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Call FileSystem.OpenReadWrite, write to FileSystem.Stream and close it when done.
     
    Johan Hormaza likes this.
  3. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    thank you very much for everything
     
  4. tigrot

    tigrot Well-Known Member Licensed User

    The example I showed you yesterday was complete with the three steps showed by Erel. Openreadwrite, write stream and close.
    Give a look! It's related to SD filesystem but the only difference is that the library is not rSd.
     
    Johan Hormaza likes this.
  5. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    Excuse me, remind me where ...:D
     
  6. tigrot

    tigrot Well-Known Member Licensed User

  7. tigrot

    tigrot Well-Known Member Licensed User

    Remember that in IDE the sketch is started twice and only the second is monitored. So you will find that the file is already present in filesystem! I write this because I spent two days in this non-issue!
     
    Last edited: May 24, 2018
    Johan Hormaza and Erel like this.
  8. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    Hello, excuse me what you mean by that. It's time and I could not achieve it:(
     
  9. tigrot

    tigrot Well-Known Member Licensed User

    It means that in debug mode the sketch is started a first time with no debug and a second one when the debugger connects. So if there are init procedures they are repeated twice so magically you find that values in eprom are already there
     
    Johan Hormaza likes this.
  10. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    AAAhh ok I understood. Thank you very kind
     
  11. Johan Hormaza

    Johan Hormaza Active Member Licensed User

    Yes @tigrot that was, it works! Thank you:D
     
    tigrot likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice