I apologize for what is likely an ignorant question, but I am fairly new to electronics and have little confidence. I am working on a personal project where I am using a servo motor to move a rod back forth 90 degrees (not exactly, but this analogy should suffice), and I am interested in measuring the instantaneous (angular?) acceleration (I want to use it to calculate torque). Surprisingly, I have come across trouble while researching online for a sensor to do this. My understanding now is that an accelerometer is only capable of measuring linear acceleration (which means the object can't be rotating, right?), while a gyroscope only measures angular velocity when an object is spinning about an axis. Technically, the rod in my project isn't spinning-it's just rotating back and forth between two angles (0 and 90) on the XY plane. Is there a simply way/sensor to do this? More broadly, am I completely misunderstanding the uses of gyroscopes and accelerometers? I hope I explained the issue properly...
Edit: Sorry about the confusion. I am using a servo to rotate a rod back and forth and need to measure the instantaneous torque. While the rod is moving, there will be times at which a force acting against the rod/servo is applied, which means that the torque shouldn't remain constant between experiments.
I thought of a couple of ways to do this, and one idea I had was using calculating the torque using: torque=I (moment of inertia)*angular acceleration. To get the angular acceleration however, I figured I need a sensor. I thought an accelerometer might work, but don't know how I would implement it in my system or if it would even work.