How store servos movements in a microSD

urko_18:
Okay, I do not know if I understand you at all, so, I'm going to start going step by step:

First, when I save the array of the positions of the motors on the SD card (something like this: [2344, 4567, 6353, 5335, ...]), when I want to open the file , how can I know how many positions there are? ? Could a sizeof () be used?

Also, how could I control how often the positions are saved in the SD?

Thank you,

Urko

Since you don't know when each movement has been completed, and use delay to make a default time, store the movement code and the delay time you used. And store to the SD card at the end of each movement.

Then when read back, you have the movement and the time to delay before the next movement.

Why do you care how many many movements there are? If you want to know when the last movement has been done, make the last movement code all 9's, or something that will not be an actual movement.

Paul