It's not possible, at least with the servos sold for use with Arduino. The Arduino can command a servo to go to an angle, but it can't know whether that angle was achieved or what angle has actually been reached.
No I'm controlling a robot. For example when I press 'F' button robot moves forward and when I want to turn the robot to left, I don't know what is the latest position of the servos.
It doesn't matter if I know that the servo has actually reached the angular direction. It is important to know what angle the arduino has given to the servo.I'm controlling a robot. For example when I press 'F' button robot moves forward and when I want to turn the robot to left, I don't know what is the latest position of the servos.
I control the robot with bluetooth. when the user presses 'F' button robot moves forward, when presses 'B' button robot moves backward when presses 'L' button robot turns left and when presses 'R' button robot turns right. so there are for states that user may choose one of them. and in these four states the servos last angles are different. and when the user chooses the next state I don't know what are the last angles to move the servos from that positions to another positions.
@sterretje told you that answer.
Your only hope is to keep track of the last angle you sent to the servo. Since it's your code, that should be possible.
Per post #2. Also answered.
@alija22 as per your recent threads, you either keep asking because you don't like our answers, or because you can't understand them, or because you don't think you've asked the same question enough times.
No, there is no readback of actual position
Yes, you can keep track of the position commanded
Some servo libraries will do the latter for you, and provide a fn to read back the position. But it's still the position sent, not the actual position.