[Help] Servo Motor reading values

Hello all, so..

I've recorded values of axes x,y,z moving along the time in a file, now I want to reproduce those movments with servo motors exacly like they were recorded. so I have to build something that allows me to upload the file to the arduino and then automatically control the servo motors to replicate the movements syncronized in time

this values were recorded in sample rate of 1/8 so the they look like this:

Time X Y Z
0 143 -65 -32
8 140 -61 -35

I'm comfortable with coding but im new with arduinos, so what pieces do I need for this puzzle?

  • upload the file to the arduino like an array?
  • Make a cycle reading the 3 values (X,Y,Z) at the correct speed/sample rate and move the motors according at the same time

Do you have any tips or some examples that perhaps could help me?
Thank You!

How many values do you have? If it's a few, you could just put them in an array. If a lot, look at progmem to store them.

Do you need to do this with different files? Use an SD card to store them and use file operations to read the data.

Lets say for a recording of 3 minutes maybe 50000 values for each axies.
Yes I'm thinking of using an SDCard to store the data.

You already have the relationship between 3d co-ordinates and servo angles covered then? (So you know that to get the end-effector at x1, y1, z1 you need angles a1...an on the servos?)

What exactly do you mean by "recorded in sample rate of 1/8"? If 3 minutes is 50000 values, that would be sample rate of 277.777 per second. Or is it not a steady sample rate, but a sequence of commands with timestamp in 8ths of a second? But then you only have 1440 unique timestamps in 3 minutes, so I don't understand where the 50000 is coming from. Or does the time value mean to wait that many milliseconds or something before executing the next command?