Using data from text file in SD card

Hello.

I have to make a servo motor follow a sequence of specific angles during a long period of time (more than 10.000 angles in 30 seconds intervals between each position). The arduino must be running the program on its own (i.e. connected to a battery, not a computer).

I'm really new at programming, but there is no problem finding tutorials to move the servo, the problem really lies in how I'm going to store and transmit the positions to the servo, since there are way too many positions to be stored in an array.

So my thought was to store the positions in a text file in a SD card, and then access each position at a time to pass on to the servo. I found rerally good tutorials on how to STORE data in the SD card, but didn't have much luck finding out how to RETRIEVE data from the SD card.

I'm really lost here, any suggestions on how this could be done?

How about starting with the ReadWrite example that comes with the SD library ?

the problem really lies in how I'm going to store and transmit the positions to the servo, since there are way too many positions to be stored in an array.

Not necessarily; if you put the array into program memory of a mega, this becomes almost trivial. With a clever compression scheme, you may even squeeze it into the program memory of a Uno.

Instead of saving each angle to move to is there any pattern to the movement and/or are there any repeated patterns of movement ?