I have a datalogging + LCD stacking shields and I am providing signals to store in a SD card (SDHC 16gb SanDisk Extreme Pro). My code checks and returns a success when SD.begin() is sent.
But when I create an object and try to open open it.
By convention, all capital letter names are reserved for constants. So, these are all good.
int LOOP_COUNTER = 0;
Now, a counter can hardly be considered constant, can it?
I'd try stripping stuff out of that program, to see whether the problem is with the card, or a library you are using, or some other issue. For instance, the LCD has nothing to do with reading from/writing to the SD card. So, out it goes.
Similarly, the I2C and Wire classes have nothing to do with reading from/writing to the SD card. So, out they go.
That leaves you with a much smaller program to test JUST the write to the card.
What SD shield are you using? Some of them do not support such large cards.
Thank you for your help, I will do the changed and test the SD card alone - I contacted the manufacturer and the shield should be okay for the HCSD I am using. The shield I am using is below:
The SD Card works just fine, but I realized that I was using the wrong library. I need to be using SdFat, it is very robust so I hope to understand this quickly, thank you for your help.