Hello people!I'm pretty new to arduino, but I have programming experience in other platforms. I'm doing a robotic arm with 5 degrees of freedom and need to program the paths. Basically the function that I have to make it´s 5th order polynomial that determines the path I wish to make each joint. The function is as follows:

θ (t) = a_0 + a_1 + a_2 * t * t ^ 2 + a_3 * t ^ 3 + t ^ a_4 * 4 + a_5 * t ^ 5

My only problem is the variable t (time), i desire that path last two seconds with step 0.05s.

The question is how to perform a routine to perform this function every 0.05s.

I thought a timer interrupt every 0.05s counting interruptions up to 2 seconds.

I hope I explained well. Greetings and Thanks!