How to measure the real angle value of servo motors(axes) of thinkerkit robot


Could you please help me to find a way so that I can measure the real exact value of the angles of each axes of a thinkerkit robot?
The robot works with the library of “Braccio.h” and “Servo.h”. I have used the read() function of the “Servo” library, but it does not give the real value of the angle in real-time.
Actualy I want to have the differnce value between teoric and real value of the angles.

Best Regards,

Hi behnam_e welcome to the forum.

Don’t post a picture of your code. Paste it as text and use code tags.
This and many more helpful tips for new forum members like yourself can be found in the General Guidance and How to use the Forum at the top of the list of forum topics. Please read that.

As you might have discovered, the method does not measure the actual position of the servo arm. Instead, it merely returns the last value that you wrote to the servo.

Most hobby servos have no communication back to the arduino. Some have a fourth wire that can be read using an analogread(). And if you are crafty, there are tutorials out there on how to open the servo and add a wire to the position pot so that you can add the feature to your own servos.

There are also higher end servos (quite expensive) that have 2 way communication that includes real world position information.

Thank you for the information, I got the point.