Hi,first of all i am not good at code part of arduino. I am writing a code to save datas to a .txt file. I use arduino uno and think my connection part is true.I am using Catalex MıcroSD Card Adaptor. Here is my simple code;
I remove the SD Card and insert again in a one second while program is running.Then it works.I see the serial port like that;
OK
writing...
done
something
something
something
something
something
something
something
My question is that why does not my code work at first time ? Why do i need to remove and insert the SD card ? I hope, i have explained my problem correctly.
Thanks in advance
I am using the Catalex mini shield identical to yours. Your code runs for me without the removal and reinsertion of the card. Are you sure the card is fully inserted when the sketch fails?
Edit following your latest post.
Is there anything else connected to the Arduino other than the SD module?
How are you powering the Arduino?
In actually it is not about inserting or removing SD Card. Because,while program is running, i remove and reconnect 5V or GND connection instead of removing card, it works again. :
Thans for your reply.
I have changed my SD card and problem was solved. There is no any mistake in code and connection part. When i run my old card in card information part of arduino, arduino could not define its FAT type (FAT16 or FAT32) and i have ignored this situation. It was a big mistake >:(