Rotation sensor for robotic arm?

Thank you. I will try an encoder.