victorfb:
You didn't answer the first question.
I don't know how many values will be stored, it will depend on how long is the path that the car that has the sensors will pass. I imagine will be a lot of values since I have a sensor reading every 35ms
I submit you should just cut to what the real problem is, and forget about answering unanswerable questions, for which you probably already have a solution.
You have already done the bleeding obvious and gotten a SD card module, which probably cost $1.50. In the (highly) unlikely event that the data you need to store doesn't really justify an SD card, then it's still only $1.50, which would be struggling to be 5% of your Arduino investment, and it will do the job anyway. If you have too much data, either get a bigger card or come to terms with the fact that Arduino might be the wrong choice to start with, and it cost you $1.50 to find that out.
I believe the real problem is just a matter of code, not storage. The first bit you attach in reply #12 is simply a one-shot to ensure everything is kosher, but contains the seeds for proper employment. I know nothing about the second bit, I can't even see how you can say it works, but it does, so all you need now is to splice them together.
I know this sounds a bit glib but the Arduino sends information to its various receptors in the same way. The one-shot shows the way
open file
myFile.print(data)
close file
you just need to put it in the loop which, in your code, currently does nothing. So:-
void loop() {
aquire data// tralala
Serial.print(data);
myFile = SD.open("name.txt", FILE_WRITE); //+++++++++++++OPEN
myFile.print(data); // just like serial
myFile.print(" , "); // comma separation
myFile.close();//++++++++++++++++++++++++ CLOSE
}
// and go round again
The file is typically a CSV, i.e. comma separated, suitable for a spreadsheet, which is an array of data, and I guess it is the sort of thing you need.
Is that what you need?