Closed-Loop Servo Control Using an Encoder

so i am trying to use an absolute encoder to control the rotational speed of a continuous servo. specifically, i am trying to control the speed of the motor such that when the encoder reads a certain position value, the servo starts to decelerate. I am using an arduino ATMEGA.

i am very new to using arduino, so i dont really know where to go to start... any suggestions would be much appreciated.

thanks,
MT

Please don't cross-post, it wastes time.
Duplicate post deleted.