I have a soil moisture sensor and it records the values in an sd card. I accidentally deleted the existing file in the folder, and now every time I plug in the sd card no file appears. I tried to change the filename to create a new file instead, but nothing happened. Does anyone know why this is occurring?
So you now have a blank SD card because the data file was accidently deleted.
And the assumedly Arduino application will not write to the SD card without an initial file (even if empty) is on the card.
We will need to see the Arduino code. Use the above "</>" icon to post the code.
Just a note: Whenever I copy data to my computer from somewhere, the first thing I do is to archive it (zip etc) with the data name appended with _raw. This way I always have a backup on my PC.
Apparently, your code is so secret you are not even allowed to tell us if it created a file in the first place, and changing the file name is not likely to fix anything. The only conclusion that can be drawn is that the SD is a dud, possibly due to user abuse. With the SD library, so long as the file name is nominated in the code, Arduino will write to it. If the file exists, it will append, if it doesn't, it will create it.
Of course not, because you failed to provide any useful information.
For informed help, read and follow the instructions in the how to use the forum post.
Edit: Now that you have finally posted some code, go back and edit the post to add code tags.
Nevermind, simply reseting the board and card brings back the file. Of course the original data won't be in there but that isn't a worry for me.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.