Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Given these options, I think I'd like to use the index and iterate through the files again. I'll only pull a new file from an SD card once every hour or so so as long as it appears to the user to be fairly quick, this sounds like a good way to go for me. Commented Jun 7, 2017 at 12:53
  • Also ... of course when the SD card content changes meanwhile it will take the newest file names. If really needed, you should not block the sketch while reading, but maybe this is not needed for you. Commented Jun 7, 2017 at 12:58
  • Ahh! I hadn't thought of that, for this function I think I'll be ok since writing to a file will be rare. Out of curiosity, is there a good way to do the equivalent of a while loop without blocking the sketch? I'm decently new to programming at this level XD Commented Jun 7, 2017 at 13:08
  • About blocking, that might get tricky. I will mention it (in a rough form) in my answer Commented Jun 7, 2017 at 13:13
  • Thanks for the edit. I think I'll look to implement something akin to it depending on how long it takes to read the SD card in full (I don't see there ever being more than 1GB of files so it may be alright to have it blocked during reading) Commented Jun 7, 2017 at 13:54