many files into aray from SD card

Hi,
Trying to do a project but not sure if it's possible, my skill level is I can get simple loops to output to a screen.

I have an SD with 1000's of one line text files, maybe 100 ish numbers in each. I would like to read file by file, the numbers into an array and display said numbers one at a time on a screen.

I am worried there will be memory issues on my uno, and since I really am having a hard time understanding some of read commands / scripts I see posted here on working with SD -> arrays.

So I want the ardunio to open file 1, read contents into array, display array , repeat for file two and so on.

Is this doable? any memory issues using an uno / nano, at my very low skill level how do-able is this ?

nopuk:
Hi,
Trying to do a project but not sure if it's possible, my skill level is I can get simple loops to output to a screen.

I have an SD with 1000's of one line text files, maybe 100 ish numbers in each. I would like to read file by file, the numbers into an array and display said numbers one at a time on a screen.

I am worried there will be memory issues on my uno, and since I really am having a hard time understanding some of read commands / scripts I see posted here on working with SD -> arrays.

So I want the ardunio to open file 1, read contents into array, display array , repeat for file two and so on.

Is this doable? any memory issues using an uno / nano, at my very low skill level how do-able is this ?

Simple arithmetic will give you the answer about memory.

Size of a number in bytes X 100ish each X 1000s of files = size of your array in bytes.

You decide how much memory you need.

Paul

Paul_KD7HB:
Simple arithmetic will give you the answer about memory.

Size of a number in bytes X 100ish each X 1000s of files = size of your array in bytes.

You decide how much memory you need.

Paul

So for an INT that gives about 200 kilo bytes, I was asking for more advice on do I read in and create all the arrays at once, or read, print output and repeat ?

Also is this doable ? I see many issues people have with arrays and unknown sizes etc , ideally I would prefer an array where I could just keep pushing elements into without first declaring a max size.

So for an INT that gives about 200 kilo bytes,

So given a Uno has 2K of memory then you can answer your own question.

is this doable

ideally I would prefer an array where I could just keep pushing elements into without first declaring a max size.

You can’t do that in the C language, maybe look at a linked list structure rather than an array.

nopuk:
I have an SD with 1000’s of one line text files, maybe 100 ish numbers in each. I would like to read file by file, the numbers into an array and display said numbers one at a time on a screen.

What kind of numbers? If stored as float/double/long that’s four bytes per. If stored as ints it’s two bytes per. Maybe they’re even stored as ASCII.

Never used an SD card but, it certainly should be possible to open a file, read all into an array, then run through the array and print the contents and finally, close the file. Lather, rinse, repeat. If need be, limit the reading to X numbers at one time (conceivably even as low as one) and do multiple reads 'til you reach end of file.

Why do you need to store the numbers in an array? Is there some reason you can't just read the file and print as you go, without storing anything?

Why do you need to do this? This sounds very much like something better done on a PC, so can't you dump the whole shebang into Excel?

nopuk:
So I want the ardunio to open file 1, read contents into array, display array , repeat for file two and so on.

If you only put file data from one file at a time in the array then...

As long as the array can hold any of the files it will work, but not for all the files at once.