0

So I'm trying to create a new file that has underscores in its name. However, when I try this, no file is created.

This works

String fileName = "NMEA.txt";
mySensorData = SD.open(fileName.c_str(), FILE_WRITE); 

This does not work

String fileName = "NMEA__23_33_3__16_7_29.txt";
mySensorData = SD.open(fileName.c_str(), FILE_WRITE); 

Does anyone know why?

3

[The SD library] uses short 8.3 names for files.

source

  • Do you have any tips on how I can organize my files then? As you can see in the above format, I have it as NMEA__hr_mn_ss__yr_mm_dd.txt. – Zoom Bee Jul 30 '16 at 0:21
  • I tried String fileName = "/23_33_3/16_7_29/NMEA.txt" to organize it by directory and it doesn't seem to create them. – Zoom Bee Jul 30 '16 at 0:22
  • Have you actually created those directories? It won't magically make them for you... – Majenko Jul 30 '16 at 9:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.