Dear forum
I do not seem to get the correct search phrases for this question:
I read sensor input. Every 5 minutes I write 7 values with a time stamp to a logfile in LittleFS.
Now and then I want to read (some) values of this file and show it in a chart.
Can I do that? Can you open a file for writing and a the same time and in another function open the same file for reading without conflict?
Thanks
Is reading and writing a Littlefs logfile at the same time allowed?
-
- Posts: 12
- Joined: Fri Jul 02, 2021 12:18 am
Re: Is reading and writing a Littlefs logfile at the same time allowed?
Are you using Arduino's LittleFS or some other variation? If so can you provide the link to confirm the implementation.
Re: Is reading and writing a Littlefs logfile at the same time allowed?
I am using the built in LittleFS, I did not install any other library for LittleFS.
-
- Posts: 12
- Joined: Fri Jul 02, 2021 12:18 am
Re: Is reading and writing a Littlefs logfile at the same time allowed?
Using the arduino IDE for an ESP8266 project. I am using the LittleFS library that comes with the Arduino IDE, or maybe when you install the ESP8266 stuff. I did not install any 3rd party LittleFS library.
-
- Posts: 12
- Joined: Fri Jul 02, 2021 12:18 am
Re: Is reading and writing a Littlefs logfile at the same time allowed?
This question is specific to LittleFS, not so much Arduino as an interrupt may be triggered to write the data while reading is in progress, however, if LittleFS creates a variable to hold if the data is locked then that will be an issue.
Have you implemented an interrupt/protothreads to handle triggering either reading or writing while the opposite is occurring, or what method are you attempting to use to kick off the read/writing while the other is taking place?
Have you implemented an interrupt/protothreads to handle triggering either reading or writing while the opposite is occurring, or what method are you attempting to use to kick off the read/writing while the other is taking place?
Who is online
Users browsing this forum: No registered users and 6 guests