# Angles Measurement to control (move) a robotic arm [closed]

I am working on a robotic arm, I am going to use servo motors, those are going to be controlled from the PC with command (it is a chess-game arm) so the command will be some thing like move piece from A1 to E7 for example.

How can I calculate the angle that I am going to pass to the servos for each specific command?

• I'm not sure you and I mean the same thing by 'calculate'. The obvious answer is 'trigonometry', but as that's so obvious, you must mean something else. You need to know where A1 and E7 are in some coordinate system, which needs to be translated into and calibrated in machine units, which needs translating into servo moves. I tend to use SI within my programs for consistency, translating to other coordinate systems (when necessary) right at the boundary, so my steppers will be calibrated in steps/metre. Perhaps put up a block diagram of both your mechanical system, and proposed code to clarify – Neil_UK Dec 21 '17 at 8:55

Number the squares 1-8 in the x direction and 1-8 in the y direction, then the angle will be: $\small arctan\large \left(\frac{(next\: y)-(current \:y)}{(next\: x)-(current \:x)}\right)$.