i'm using PIC16f877A microcontroller.. so i want to learnt how to get or do sinus wave motion to make the snake to move as snake in sinus wave.. i'm using servo motors to control each segment..so, now i have to write the source code to make the servo to move? how?
Dear use buffer with n places=== full sine wave u need(each cell is o/p of each servo motor) then for each scan rotate the buffer by one ==>next motion
use array(1..n) n:no of servo motors o/p's then put your initial sine wave for each segment.
then rotate right or left(direction) with your time rate .
use low pass filter for rotate between each two array points as required.