Rotation sensor for robotic arm?

Hello,

I recentley had an idea. What if I made a robotic arm that responds to movement in your arm? The only thing that I don't know how to do are the rotation sensors for the brace that attaches to your arm. I thought about using pots, but can that be used to measure degrees of rotation? Thank you.

-flam

Accelerometers attached to your arm and forearm would tell you the angle that each is tilted at (after you stop moving your arm). Not sure what the best way to detect swinging your arm though.

Theoretically rotary pots could be used, but you'd need fairly precise ones and you'd probably have to do a custom calibration of the voltage output over at various points within the rotation arc. A better choice would be a rotary encoder, there are some libraries and examples on basic rotary encoder usage at the linked page.

Thank you. I will try an encoder.