hmm... i will just copy and paste the description from Pirate Brain in here.... becouse i am afraid every word i write will create a bigger missunderstanding
PirateBrain wrote:
I wrote a smooth sine wave transition for servos between any two positions with some added features.
Recent edit: fixed cross contamination delay problem
Features:
-Multiple servos can run simultaneously, each with different start speed, end speed, start position, end position and delay time to start values.
-the option of different start and end speeds allows the on-the-fly FOR loop stretch of the sine wave to simulate a more natural movement
-all position computation is done at the (1700 unit) resolution of the servo so there is basically little to no twitch.
-you can declare the desired movement positions of the servo in microseconds (position value)
-servo variables and movement function is modular so more servos can be added (I usually run a similar code with 6 servos simultaneous movement)
Limitations:
-all servo movement function is only 1 direction for each sine wave movement of servo, code waits for all servos to complete their singular motion before being able to go to next programmed move function -I am working on a continuous multi-count wave based on arrays..