How to read a file from a SD by Lazarus?

Hi,

My arduino device have an SD Card where i store the data from different sensors, into an *.csv ascii file.

I am developing a software by lazarus (free pascal) to have real time data. However, i would like also to download the data already stored in the SD card through my software. Is it feasible? How?

I have on mind that to put the arduino to read the *csv file and to send each line through the serial com port could be a solution, but i really don´t know if other solution is possible.

Any idea to start with will be appreciated. Thanks!

However, i would like also to download the data already stored in the SD card through my software. Is it feasible? How?

The PC that Lazarus is running on does not have direct access to the SD card. However, you could send the Arduino commands like "DumpFile fileName" or "DumpFileNames" and have it perform the required action(s).

I have on mind that to put the arduino to read the *csv file and to send each line through the serial com port could be a solution, but i really don´t know if other solution is possible.

It's certainly the simplest.

Thanks PaulS,

Ok, so i was not so wrong!. If this is the simplest solution, i will explore it based on what you proposed: to use the DumpFile command.

Here is the idea from the Arduino Webpage, what may be also usefull to other users: http://arduino.cc/en/Tutorial/DumpFile

Thanks!!