Go Down

Topic: SD card became unrecognized by card readers (Read 12 times) previous topic - next topic

al_ra

hi guys,

I've tried to make a data logger for a gps receiver and used this code:

  myFile = SD.open("POS.txt", FILE_WRITE);
  myFile.print("Satellites in view: ");
  myFile.println(gps.satsinview(), DEC);
  myFile.print("Lat : ");
  myFile.print(LAT/100000,7);
  myFile.print(" Lon ");
  myFile.println(LON/100000,7);
  myFile.close();

this code section is in the loop function so it repeats it self endlessly
I haven't made any safe remove function in the code .

after using this code once, my sd card became unrecognized in any card reading devices (arduino card reader, my laptop card reader, my camera)
because of that I can't format it or use it.

does someone knows how to fix it? and\or avoiding this problem in the future?

thanks!

Grumpy_Mike

Quote
after using this code once,

How long for.?
Opening the same file and writing to it over and over seems to me a good way of wearing out your SD card.

al_ra

I used it for about 20 seconds before I shut it off. (it needed to access the file about 20 times)
so you say that in this case I need to open and close the file only once? (opening the file in the setup and making a safe remove function to close it)

do you know if I can save the card and make it work again?

PaulS

Quote
I used it for about 20 seconds before I shut it off.

20 seconds should not have damaged your card. Of course, we can't actually see how many times you wrote to the card in that 20 seconds, but I can't imagine having written more times than the card can be written to in just 20 seconds.

Grumpy_Mike

It might have left something part written or you I terrupted something critical. However if you are not able to format it then I assume it is dead.
Have you tried a low level format using your disc utilities?

Go Up